summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch '4.3.x' into 4.xTakeshi KOMIYA2021-11-281-1/+1
|\
| * Fix #9844: autodoc: Failed to preserve defvalues for partial functionTakeshi KOMIYA2021-11-261-1/+1
| |
* | Merge branch '4.3.x' into 4.xTakeshi KOMIYA2021-11-231-1/+1
|\ \ | |/
| * Fix #9879: autodoc: AttributeError for object having invalid __doc__Takeshi KOMIYA2021-11-221-1/+1
| |
* | Fix #9866: autodoc: doccoment for the imported class was ignoredTakeshi KOMIYA2021-11-211-2/+10
|/ | | | | | | 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-5/+33
|
* Fix #9752: autodoc: Failed to detect type annotation for slots attributeTakeshi KOMIYA2021-10-231-3/+11
|
* Merge branch '4.x' into 9607_incorrect_orig_basesTakeshi KOMIYA2021-09-273-7/+10
|\
| * Merge branch '4.x' into 9657_qualname_of_mockTakeshi KOMIYA2021-09-272-6/+7
| |\
| | * Fix #9651: autodoc_typehints_description_target was confused by :returns:Takeshi KOMIYA2021-09-261-2/+2
| | | | | | | | | | | | | | | It only checks the existence of `:return:` field. And it does not check `:returns:` field. It causes the absence of return types.
| | * Fix #9655: autodoc: mocked object having doc comment is warned unexpectedlyTakeshi KOMIYA2021-09-241-4/+5
| | | | | | | | | | | | A warning for mocked object should not be emitted if it has doc comment.
| * | Fix #9657: autodoc: basecls for a subclass of mocked object is incorrectTakeshi KOMIYA2021-09-211-1/+3
| |/
* | Fix #9607: autodoc: Incorrect base class detectionTakeshi KOMIYA2021-09-201-1/+1
|/ | | | | | | | | 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.
* Merge pull request #9644 from xmo-odoo/fix-sourcename-broken-getattrTakeshi KOMIYA2021-09-181-2/+2
|\ | | | | Protect `sphinx.ext.autodoc.get_sourcename` against misbehaving `__getattr__`
| * Protect get_sourcename against misbehaving `__getattr__`Xavier Morel2021-09-171-2/+2
| |
* | Close #9639: autodoc: Support asynchronous generator functionsTakeshi KOMIYA2021-09-171-2/+2
|/
* Fix typos discovered by codespellChristian Clauss2021-09-081-2/+2
|
* Merge branch '4.x' into 9479_autodoc_mocked_targetTakeshi KOMIYA2021-08-021-9/+13
|\
| * Fix autodoc_docstring_signature support for __init__ and __new__Jeremy Maitin-Shepard2021-07-311-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix #9479: autodoc: Emit a warning if target is a mocked objectTakeshi KOMIYA2021-07-271-0/+4
|/
* Merge branch '4.1.x' into 4.xTakeshi KOMIYA2021-07-261-1/+6
|\
| * Fix #9436, #9471: autodoc: crashed if autodoc_class_signature = "separated"Takeshi KOMIYA2021-07-241-1/+6
| | | | | | | | A list should be used for special-members option instead of set.
* | Merge pull request #9488 from tk0miya/9487_typehint_for_cached_propertyTakeshi KOMIYA2021-07-241-2/+9
|\ \ | | | | | | Fix #9487: autodoc: typehint for cached_property is not shown
| * | Fix #9487: autodoc: typehint for cached_property is not shownTakeshi KOMIYA2021-07-221-2/+9
| | |
* | | Merge branch 'sphinx-doc:4.x' into 4.xLouis Maddox2021-07-191-2/+29
|\ \ \ | |/ /
| * | Close #9445: autodoc: Support class propertiesTakeshi KOMIYA2021-07-171-2/+29
| |/ | | | | | | | | Since python 3.9, `classmethod` starts to support creating a "class property". This supports to generate document for it.
* | Improve sphinx.ext.autodoc docstringsLouis Maddox2021-07-191-6/+6
| |
* | Fix warning typo; improve sphinx.ext.autodoc docstringsLouis Maddox2021-07-191-4/+4
| |
* | Improve sphinx.ext.autodoc docstringsLouis Maddox2021-07-181-2/+2
|/
* Fix #9384: autodoc_typehints='none' supports typehints for attributesTakeshi KOMIYA2021-06-291-11/+15
|
* Fix #9283: autodoc: failed to build doc for attribute not commentedTakeshi KOMIYA2021-05-301-0/+27
| | | | | | Autoattribute directive should check the existence of instance attribute that is defined inside __init__() but not having comments before accessing it.
* Fix #9250: autodoc: The inherited method not having docstring is wrongly parsedTakeshi KOMIYA2021-05-231-2/+2
| | | | | | `sphinx.util.inspect.getdoc()` clean the docstring up if the method is inherited and not having docstring. That causes indentations are removed on processing it.
* Merge branch '4.x' into 3014_autodoc-process-basesTakeshi KOMIYA2021-05-171-2/+63
|\
| * Merge branch '4.x' into 9218_doccomment_for_aliased_classTakeshi KOMIYA2021-05-161-0/+48
| |\
| | * Close #4257: autodoc: Add autodoc_class_signatureTakeshi KOMIYA2021-05-161-0/+48
| | | | | | | | | | | | | | | Add `autodoc_class_signature` to separate the class entry and the definition of `__init__()` method.
| * | Close #8061, #9218: autodoc: Support variable comment for alias classesTakeshi KOMIYA2021-05-151-2/+15
| |/
* | Close #3014: autodoc: Add autodoc-process-basesTakeshi KOMIYA2021-05-161-7/+13
|/ | | | | | Add `autodoc-process-bases` to modify the base classes of the class definitions. This allows the extensions to insert or modify the list of the base classes via event-handlers.
* Merge pull request #9185 from AWhetter/autodoc_typehints_bothTakeshi KOMIYA2021-05-122-5/+5
|\ | | | | autodoc.typehints can accurately represent overloads
| * autodoc.typehints can accurately represent overloadsAshley Whetter2021-05-082-5/+5
| |
* | Merge branch '4.0.x' into 4.xTakeshi KOMIYA2021-05-111-1/+1
|\ \
| * | Fix #9189: autodoc: crashed by ValueError on generating signature of propertyTakeshi KOMIYA2021-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | Autodoc is crashed if `inspect.signature` raises ValueError on generating signature from a property of the class. It seems the original code re-raise the exception meaningless. So this ignores it even if raised.
* | | Merge pull request #9182 from tk0miya/refactor_autodocTakeshi KOMIYA2021-05-101-16/+15
|\ \ \ | | | | | | | | refactor: autodoc: Remove backslashes from the tail of line
| * | | refactor: autodoc: Remove backslashes from the tail of lineTakeshi KOMIYA2021-05-081-16/+15
| | |/ | |/|
* | | Fix #9175: autodoc: Special member is not documented in the moduleTakeshi KOMIYA2021-05-081-1/+2
|/ / | | | | | | | | | | 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 branch '4.x' into 8597_metadata_only_docstringTakeshi KOMIYA2021-05-032-29/+51
|\ \
| * | Fix #8872: autodoc: stacked singledispatches are wrongly renderedTakeshi KOMIYA2021-05-031-25/+38
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Close #8107: autodoc: Add class-doc-from option to autoclass directiveTakeshi KOMIYA2021-05-012-4/+13
| |/ | | | | | | | | | | Add `class-doc-from` option to the `autoclass` directive to control the content of the specific class. It takes `class`, `init`, and `both` like `autoclass_content`.
* | Fix #8597: autodoc: metadata only docstring is treated as undocumentedTakeshi KOMIYA2021-05-021-4/+4
|/ | | | | The metadata in docstring is invisible content. Therefore docstring having only metadata should be treated as undocumented.
* Merge branch '4.0.x' into 9110_restify_GenericAliasTakeshi KOMIYA2021-04-201-1/+8
|\
| * Fix #9095: autodoc: TypeError is raised on processing broken metaclassTakeshi KOMIYA2021-04-191-1/+8
| | | | | | | | | | | | | | The logging module is crashed when the target object is a broken metaclass that raises a TypeError on `isinstance()`. This adds a workaround code to avoid the error.