summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc/importer.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix COM812Adam Turner2023-02-181-1/+1
|
* Adopt ``profile = "black"`` for ``isort``Adam Turner2023-01-071-2/+8
| | | | This allows using Ruff's import sorting fixers
* Run pyupgrade (#11070)Adam Turner2023-01-021-3/+3
|
* Use PEP 604 typesAdam Turner2023-01-011-3/+3
|
* Use PEP 595 typesAdam Turner2023-01-011-8/+8
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-011-0/+2
|
* Tighten mypy 'strict optional' whitelist (#11038)danieleades2022-12-291-2/+6
| | | Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* Remove traces of Python 2 and 3.5 (#10560)Adam Turner2022-06-161-5/+2
|
* Fix documenting inherited attributesAdam Turner2022-06-081-2/+7
|
* Set the docstring attribute of class members. Fixes #8180.Anselm Kruis2022-05-231-1/+8
| | | | | Change ext.autodoc.importer.get_class_members to set ObjectMember.docstring the docstring found by the source code analyzer.
* Remove deprecated code for Sphinx 5.0Adam Turner2022-04-171-25/+1
|
* Collapse single line docstringsAdam Turner2022-02-201-2/+1
|
* Remove copyright and licence fieldsAdam Turner2022-02-201-3/+0
|
* Fix module docstring indentationAdam Turner2022-02-201-2/+2
|
* Fix module docstring first lineAdam Turner2022-02-201-2/+1
|
* Remove module titles in docstringsAdam Turner2022-02-191-3/+0
|
* A happy new year!Takeshi KOMIYA2022-01-011-1/+1
|
* Improve sphinx.ext.autodoc docstringsLouis Maddox2021-07-181-2/+2
|
* 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.
* refactor: Use PEP-526 based variable annotation (sphinx.ext)Takeshi KOMIYA2021-03-151-3/+3
|
* Merge branch '3.x' into master_with_merged_3.xjfbu2021-02-021-27/+29
|\
| * Fix #8800: autodoc: Uninitialized attributes in superclass are recognized as ↵Takeshi KOMIYA2021-02-011-8/+19
| | | | | | | | | | | | | | | | undocumented Unintentionally, uninitialized attributes defined at superclasses are recognized as undocumented in the filtering step. Therefore, they are filtered if `:undoc-members:` option given.
| * refactor: AttributeError handling for getslots() is not neededTakeshi KOMIYA2021-01-311-2/+2
| |
| * refactor: AttributeError handling for getannotations() is not neededTakeshi KOMIYA2021-01-311-20/+11
| |
* | Merge branch '3.x'Takeshi KOMIYA2021-01-281-0/+4
|\ \ | |/
| * Fix #8134: autodoc: crashes when mocked decorator takes argumentsTakeshi KOMIYA2021-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch '3.x'Takeshi KOMIYA2021-01-011-1/+1
|\ \ | |/
| * Merge branch '3.4.x' into 3.xTakeshi KOMIYA2021-01-011-1/+1
| |\
| | * A happy new year!Takeshi KOMIYA2021-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | .. note:: $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \; $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
* | | Merge branch '3.x'Takeshi KOMIYA2020-12-311-21/+14
|\ \ \ | |/ /
| * | refactor: autodoc: Replace ClassAttribute by ObjectMemberTakeshi KOMIYA2020-12-301-21/+14
| | | | | | | | | | | | | | | | | | After the series of refactoring, it would be better to use ObjectMember directly inside get_class_members(). And ClassAttribute is no longer needed.
* | | Merge branch '3.x'Takeshi KOMIYA2020-12-291-0/+4
|\ \ \ | |/ /
| * | Fix #8592: autodoc: `:meta public:` does not effect to variablesTakeshi KOMIYA2020-12-271-1/+5
| |/ | | | | | | | | | | | | To control the visibility of variables, ModuleDocumenter have to load docstring of them on `get_object_members()` phase. This reimplements it and `get_module_members()` helper to fetch docstring on earlier phase (as ClassDocumenter does).
* | Remove deprecated function: sphinx.ext.autodoc.importer:_getmro()Takeshi KOMIYA2020-12-201-6/+0
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-12-201-9/+92
|\ \ | |/
| * Fix #741: autodoc: inherited-members doesn't support instance attributes on ↵Takeshi KOMIYA2020-12-181-20/+28
| | | | | | | | | | | | | | | | | | super class To support instance attributes on super class, get_class_members() scans the instance attributes defined at super classes using ModuleAnalyzer. It allows to generate document for them when users gives : inherited-members: option.
| * Fix #8545: autodoc: a __slots__ attribute is not documented even having ↵Takeshi KOMIYA2020-12-171-2/+3
| | | | | | | | | | | | | | | | docstring To avoid filtering __slots__ attributes having docstring at filter_members(), this passes docstring captured at get_class_members() to the filter_members() via ObjectMember.
| * refactor: get_class_members() now returns docstring if availableTakeshi KOMIYA2020-12-171-13/+25
| | | | | | | | | | To detect a __slots__ attribute has docstring, get_class_members() returns the docstring of the class member.
| * refactor: autodoc: Add get_class_members()Takeshi KOMIYA2020-12-171-0/+64
| | | | | | | | | | | | To enhance ClassDocumenter, Add a new helper function get_class_members(). At this moment, it is a copy of get_object_members(). It will be changed to return more detailed information of class members.
| * refactor: Move _getmro() to sphinx.util.inspect moduleTakeshi KOMIYA2020-12-171-8/+6
| |
* | Fix flake8 warningsTakeshi KOMIYA2020-11-251-7/+1
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-11-221-14/+16
|\ \ | |/
| * refactor: Move _getannotations() to sphinx.util.inspectTakeshi KOMIYA2020-11-221-13/+15
| |
| * Handle AttributeError from getall() and getslots()Takeshi KOMIYA2020-11-211-1/+1
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-11-211-9/+10
|\ \ | |/
| * autodoc: refactor __slots__ operations using getslots()Takeshi KOMIYA2020-11-151-9/+10
| |
| * Sort imports with isortFrançois Freitag2020-11-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Keep imports alphabetically sorted and their order homogeneous across Python source files. The isort project has more feature and is more active than the flake8-import-order plugin. Most issues caught were simply import ordering from the same module. Where imports were purposefully placed out of order, tag with isort:skip.
* | Merge branch '3.x' into masterTakeshi KOMIYA2020-10-281-1/+4
|\ \ | |/
| * autodoc: check whether __slots__ is a strMatthias Geier2020-10-241-1/+4
| | | | | | | | Closes #8294.
* | Merge branch '3.x'Takeshi KOMIYA2020-08-081-4/+26
|\ \ | |/