summaryrefslogtreecommitdiff
path: root/tests/roots/test-ext-autodoc/target
Commit message (Collapse)AuthorAgeFilesLines
* Support type comments in ``PropertyDocumenter`` (#11298)picnixz2023-04-062-0/+16
|
* Run pyupgrade (#11070)Adam Turner2023-01-023-9/+9
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-0113-1/+31
|
* Run the ``pyupgrade`` toolAdam Turner2022-10-176-13/+12
|
* Drop Python 3.7Adam Turner2022-09-272-12/+0
|
* Remove unneeded `noqa` lint suppression comments (#10772)danieleades2022-08-283-10/+10
|
* test: Add testcase for autodoc_inherit_docstring and attributes (refs: #10539)Takeshi KOMIYA2022-06-141-0/+3
|
* Add test cases for #8180Anselm Kruis2022-05-231-0/+12
| | | | | | The test checks, if ":meta private:" and ":meta public:" have an effect in attributes of a class. Currently the new test cases fail. The fix is in the next commit.
* test: Add *args and **kwargs to testcase of target.typehintsTakeshi KOMIYA2022-05-151-1/+3
|
* Merge pull request #10427 from ↵Takeshi KOMIYA2022-05-081-0/+6
|\ | | | | | | | | tk0miya/10421_autodoc_preserve_defaults_for_classmethod Fix #10421: autodoc_preserve_defaults doesn't work on class methods
| * Fix #10421: autodoc_preserve_defaults doesn't work on class methodsTakeshi KOMIYA2022-05-081-0/+6
| |
* | Merge remote-tracking branch 'origin/5.x' into HEADTakeshi KOMIYA2022-05-071-1/+4
|\ \ | |/
| * Fix #10305: autodoc: Failed to extract optional forwardrefsTakeshi KOMIYA2022-04-171-1/+4
| | | | | | | | | | Autodoc fails to extract optional forwardrefs (ex. `Optional[MyClass]`) even if `MyClass` is declared in `autodoc_type_aliases`.
* | Apply `autodoc_typehints_format` to all type hintszuqq2022-04-081-1/+12
|/ | | | Specifically: attributes, data, properties, and type variable bounds.
* Merge pull request #10285 from jmp1985/masterTakeshi KOMIYA2022-04-052-0/+14
|\ | | | | Fixed singledispatch documentation
| * Added test caseJames Parkhurst2022-04-042-0/+14
| |
* | Close #8417: autodoc: :inherited-members: option now takes multiple classesTakeshi KOMIYA2022-04-031-0/+5
| | | | | | | | | | It allows to suppress inherited members of several classes on the module at once by specifying the option to `automodule` directive
* | Merge branch '5.x' into ↵Takeshi KOMIYA2022-04-031-2/+4
|\ \ | | | | | | | | | 10266_autodoc_preserve_defaults_crashes_on_kwonlyargs_without_defaults
| * | Fix #10280: autodoc_docstring_signature generates needless return typehintTakeshi KOMIYA2022-04-031-2/+4
| |/ | | | | | | | | | | | | Basically, autodoc suppresses return value typehint for class constructors. But it was unexpectedly shown if `autodoc_docstring_signature` is enabled and docstring has multiple signatures.
* | Fix #10266: autodoc_preserve_defaults crashes on kwonlyargs w/o defaultsTakeshi KOMIYA2022-04-021-2/+6
|/
* Fix #10027: autodoc_typehints_format does not work with :show-inheritance:Takeshi KOMIYA2022-01-012-2/+6
|
* Fix #9883: autodoc: doccomment for the alias to mocked object was ignoredTakeshi KOMIYA2021-11-291-0/+7
|
* Fix #9866: autodoc: doccoment for the imported class was ignoredTakeshi KOMIYA2021-11-211-0/+3
| | | | | | | Autodoc tried to scan doccomment on the module where the class defined. But it failed to get it if the class is imported from other module. This analyzes the target module to obtain the doccomment.
* Fix #9781: autodoc_preserve_defaults does not support hexadecimalTakeshi KOMIYA2021-10-311-2/+3
|
* Fix #9752: autodoc: Failed to detect type annotation for slots attributeTakeshi KOMIYA2021-10-231-0/+1
|
* Fix #9607: autodoc: Incorrect base class detectionTakeshi KOMIYA2021-09-201-0/+4
| | | | | | | | | In case of the descendants of generic class, the value of obj.__orig_bases__ is incorrect because it returns original base arguments for the child of the generic class instead of the target class itself. This uses obj.__dict__ to get the correct __orig_bases__ information.
* Close #9639: autodoc: Support asynchronous generator functionsTakeshi KOMIYA2021-09-172-0/+8
|
* Fix typos discovered by codespellChristian Clauss2021-09-081-2/+2
|
* Fix autodoc_docstring_signature support for __init__ and __new__Jeremy Maitin-Shepard2021-07-311-0/+14
| | | | | | | | | | | | | | | | The `MethodDocumenter.get_doc` method added by 51ae283a38ed297df3fd5e0554dcc9acaa103e8c prevents DocstringSignatureMixin from working correctly for __init__ and __new__ methods. Additionally, the __new__ docstring was not obtained correctly. This commit checks for `self._new_docstrings` being set, and also corrects the logic for obtaining the __new__ docstring. There still remains the issue that when the class signature is obtained from the signature of __init__ or __new__, only the real signature is used, due to the use of `sphinx.util.inspect.signature`; the autodoc_docstring_signature option does not have any effect.
* Close #9445: autodoc: Support class propertiesTakeshi KOMIYA2021-07-171-1/+6
| | | | | Since python 3.9, `classmethod` starts to support creating a "class property". This supports to generate document for it.
* Fix #9384: autodoc_typehints='none' supports typehints for attributesTakeshi KOMIYA2021-06-291-0/+10
|
* Fix #9283: autodoc: failed to build doc for attribute not commentedTakeshi KOMIYA2021-05-301-0/+1
| | | | | | Autoattribute directive should check the existence of instance attribute that is defined inside __init__() but not having comments before accessing it.
* Close #8061, #9218: autodoc: Support variable comment for alias classesTakeshi KOMIYA2021-05-151-0/+3
|
* Fix #9175: autodoc: Special member is not documented in the moduleTakeshi KOMIYA2021-05-081-0/+14
| | | | | | The special members are not treated as "attributes". So they're not handled by DataDocumenter. This moves the detection to the earlier step of filter_members().
* Merge pull request #9159 from tk0miya/8588_nested_autodoc_type_aliasesTakeshi KOMIYA2021-05-031-0/+5
|\ | | | | Fix #8588: autodoc_type_aliases does not support dotted name
| * Close #8588: autodoc: autodoc_type_aliases supports dotted nameTakeshi KOMIYA2021-05-031-0/+5
| | | | | | | | | | It allows users to define an alias for a class with module name like `foo.bar.BazClass`.
* | Merge branch '4.x' into 8597_metadata_only_docstringTakeshi KOMIYA2021-05-032-0/+2
|\ \
| * | Fix #8872: autodoc: stacked singledispatches are wrongly renderedTakeshi KOMIYA2021-05-032-0/+2
| |/ | | | | | | | | | | | | | | When multiple singledispatch decorators are stacked, the first typehints are copied to the subsequent definitions unexpectedly. Now autodoc generates a dummy function not to affect typehints to subsequent functions.
* | Fix #8597: autodoc: metadata only docstring is treated as undocumentedTakeshi KOMIYA2021-05-021-0/+2
|/ | | | | The metadata in docstring is invisible content. Therefore docstring having only metadata should be treated as undocumented.
* Merge pull request #8841 from AWhetter/autodoc_signatures_without_backslashTakeshi KOMIYA2021-04-041-0/+6
|\ | | | | Overloaded function signatures do not require a separating backslash
| * Overloaded function signatures do not require a separating backslashAshley Whetter2021-03-271-0/+6
| |
* | Test autodoc_typehint_undocMatt Wozniski2021-03-271-0/+10
|/ | | | | | | | | | | | | Add new tests to exercise the new autodoc_typehint_undoc option. Where an existing test would have a meaningful behavior change with the new option set to False, that test is copied, the new option is set to False in the copy, and the assertions reflect the new expected behavior. The new test test_autodoc_typehints_description_with_documented_init illustrates the problem reported in #7329, and the new test test_autodoc_typehints_description_with_documented_init_no_undoc illustrates that this issue no longer occurs when the new autodoc_typehint_undoc option is set to False.
* Close #5603: autodoc: Allow to refer to a python object using canonical nameTakeshi KOMIYA2021-03-272-0/+16
| | | | | | | | | | This generates `:canonical:` option for `:py:class:` directive if the target class is imported from other module. It allows users to refer it using both the new name (imported name) and the original name (canonical name). It helps a library that implements some class in private module (like `_io.StringIO`), and publish it as public module (like `io.StringIO`).
* Fix #7383: autodoc: Support typehints for propertiesTakeshi KOMIYA2021-03-131-0/+6
| | | | | py:property directive now outputs py:property directive to describe its type annotation.
* Fix #759: autodoc: Add sphinx.ext.autodoc.preserve_defaults extensionTakeshi KOMIYA2021-03-061-0/+19
| | | | | | | | Add a new extension `sphinx.ext.autodoc.preserve_defaults`. It preserves the default argument values of function signatures in source code and keep them not evaluated for readability. This is an experimental extension and it will be integrated into autodoc core in Sphinx-4.0.
* Close #8924: autodoc: Support `bound` argument for TypeVarTakeshi KOMIYA2021-02-241-0/+3
|
* Merge pull request #8803 from tk0miya/8775_autodoc_type_union_operatorTakeshi KOMIYA2021-02-011-0/+16
|\ | | | | autodoc: Support type union operator (PEP-604) (refs: #8775)
| * autodoc: Support type union operator (PEP-604) (refs: #8775)Takeshi KOMIYA2021-01-311-0/+16
| | | | | | | | | | Upgrade autodoc to support type union operator introduced in PEP-604. It's available only with python 3.10+.
* | Fix #8800: autodoc: Uninitialized attributes in superclass are recognized as ↵Takeshi KOMIYA2021-02-011-0/+8
|/ | | | | | | | undocumented Unintentionally, uninitialized attributes defined at superclasses are recognized as undocumented in the filtering step. Therefore, they are filtered if `:undoc-members:` option given.
* Fix #8134: autodoc: crashes when mocked decorator takes argumentsTakeshi KOMIYA2021-01-241-1/+1
| | | | | | | | | | autodoc crashed when a decorator in mocked module takes arguments because mock system returns the first argument for the decorator as a decorated object. This changes the approach for mocking decorators that remembers arguments for each decoration, and fetch the latest argument on generating document.