summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Support type comments in ``PropertyDocumenter`` (#11298)picnixz2023-04-061-23/+36
|
* Fix typos found by codespellDimitri Papadopoulos2023-03-271-1/+1
|
* Resolve ``flake8-return`` errorsAdam Turner2023-02-181-19/+15
|
* Unescape quotation marks where possibleAdam Turner2023-02-181-1/+1
|
* Fix COM812Adam Turner2023-02-181-21/+21
|
* Add ``content_offset`` parameter to ``nested_parse_with_titles`` (#11147)Jeremy Maitin-Shepard2023-02-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Previously, ``nested_parse_with_titles`` always passed ``0`` as the input offset when invoking ``nested_parse``. When parsing the content of a directive, as is a common use case for ``nested_parse_with_titles``, this leads to incorrect source file/line number information, as it does not take into account the directive's ``content_offset``, which is always non-zero. This issue affects *all* object descriptions due to GH-10887. It also affects the ``sphinx.ext.ifconfig`` extension. The ``py:module`` and ``js:module`` directives employed a workaround for this issue, by wrapping the calls to ``nested_parse_with_title`` with ``switch_source_input``. That worked, but was more complicated (and likely less efficient) than necessary. This commit adds an optional ``content_offset`` parameter to ``nested_parse_with_titles``, and fixes callers to pass the appropriate content offset when needed. This commit eliminates the now-unnecessary calls to ``switch_source_input`` and instead specifies the correct ``content_offset``.
* Resolve Ruff SIM114 violationsAdam Turner2023-02-151-18/+11
|
* Fix various Ruff errorsAdam Turner2023-01-311-1/+2
|
* Adopt ``profile = "black"`` for ``isort``Adam Turner2023-01-071-4/+18
| | | | This allows using Ruff's import sorting fixers
* Document ``typing.NewType`` as a class (#10700)Adam Turner2023-01-021-113/+78
|
* Use PEP 604 display for ``typing.Optional`` and ``typing.Union`` (#11072)Adam Turner2023-01-021-12/+15
|
* Address SIM103 lints (#11052)danieleades2023-01-021-8/+2
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Run pyupgrade (#11070)Adam Turner2023-01-021-14/+14
|
* Use PEP 604 typesAdam Turner2023-01-011-43/+43
|
* Use PEP 595 typesAdam Turner2023-01-011-54/+54
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-011-0/+2
|
* Tighten mypy 'strict optional' whitelist (#11038)danieleades2022-12-291-16/+33
| | | Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* Clean up after dropping Python 3.6Adam Turner2022-09-271-5/+2
|
* Merge branch '5.x'Adam Turner2022-09-251-1/+2
|\ | | | | | | | | | | | | | | | | | | # Conflicts: # CHANGES # doc/conf.py # sphinx/__init__.py # sphinx/builders/html/__init__.py # sphinx/domains/python.py # tests/test_build_html.py
| * Define extra indent as a class attributeAdam Turner2022-09-251-1/+2
| |
* | Merge branch '5.x'Adam Turner2022-09-231-0/+9
|\ \ | |/ | | | | | | | | # Conflicts: # setup.py # sphinx/__init__.py
| * Add contents entries for domain objects (#10807)Adam Turner2022-09-131-0/+9
| | | | | | | | | | | | | | | | | | - Add entries in the table of contents for domain objects (e.g. `py:function`, `rst:role`, etc). Supported domains are Javascript, Python, and reStructuredText. - Support content in `py:module` and `js:module` directives. - Add the `noindexentry` and `noindex` flags to more domains. - Add `toc_object_entries_show_parents` configuration setting - Update documentation and tests
* | Merge branch '5.x'Adam Turner2022-07-181-2/+1
|\ \ | |/ | | | | | | | | # Conflicts: # sphinx/ext/autodoc/__init__.py # sphinx/writers/html5.py
| * Improve static typing strictness (#10569)danieleades2022-07-181-3/+2
| |
* | Merge branch '5.x' into masterJean-François B2022-06-301-1/+1
|\ \ | |/ | | | | | | | | | | | | Resolved merge conflicts: sphinx/ext/extlinks.py sphinx/ext/napoleon/docstring.py (and removed from the latter a now unused import for flake8 F401 compliance)
| * Use the `flake8-comprehensions` lint plugin (#10601)danieleades2022-06-261-1/+1
| |
* | Remove deprecated items for Sphinx 6.0 (#10471)Adam Turner2022-06-161-34/+3
|/
* Fix documenting inherited attributesAdam Turner2022-06-081-1/+2
|
* Merge remote-tracking branch 'origin/5.x' into HEADTakeshi KOMIYA2022-05-071-124/+39
|\
| * Remove a trailing whitespaceTakeshi KOMIYA2022-04-241-1/+1
| |
| * Correct autodoc docstringsOscar Gustafsson2022-04-201-3/+5
| | | | | | | | | | A bit too much copy and paste in the earlier ones. `*-members` also includes `inherited-members` and `exclude-members` which are not dealt with.
| * Review commentsAdam Turner2022-04-171-1/+1
| |
| * Remove deprecated code for Sphinx 5.0Adam Turner2022-04-171-120/+33
| |
* | Apply `autodoc_typehints_format` to all type hintszuqq2022-04-081-4/+18
|/ | | | Specifically: attributes, data, properties, and type variable bounds.
* Merge pull request #10285 from jmp1985/masterTakeshi KOMIYA2022-04-051-4/+4
|\ | | | | Fixed singledispatch documentation
| * Removed white spaceJames Parkhurst2022-03-211-1/+1
| |
| * Fixed singledispatch documentationJames Parkhurst2022-03-211-4/+4
| |
* | Merge branch '5.x' into autodoc_force_undocumented_rtypeTakeshi KOMIYA2022-04-031-4/+8
|\ \
| * | Close #8417: autodoc: :inherited-members: option now takes multiple classesTakeshi KOMIYA2022-04-031-4/+8
| | | | | | | | | | | | | | | It allows to suppress inherited members of several classes on the module at once by specifying the option to `automodule` directive
* | | autodoc_typehints_description_target: Rename ↵Takeshi KOMIYA2022-04-031-1/+1
| | | | | | | | | | | | returnvalue_and_documented_params to documented_params
* | | Merge branch '5.x' into autodoc_force_undocumented_rtypeTakeshi KOMIYA2022-04-031-105/+158
|\ \ \ | |/ /
| * | Fix #10280: autodoc_docstring_signature generates needless return typehintTakeshi KOMIYA2022-04-031-0/+14
| | | | | | | | | | | | | | | | | | | | | 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.
| * | Merge branch '4.x'Takeshi KOMIYA2022-03-271-1/+1
| |\ \ | | |/ | |/|
| | * Update PEP links in docsHugo van Kemenade2022-03-241-1/+1
| | |
| * | Merge branch '4.x'Takeshi KOMIYA2022-03-191-9/+4
| |\ \ | | |/
| | * Remove copyright and licence fieldsAdam Turner2022-02-201-3/+0
| | |
| | * Conform to PEP 257 summary line conventionsAdam Turner2022-02-201-1/+3
| | |
| | * Fix module docstring indentationAdam Turner2022-02-201-4/+4
| | |
| | * Fix module docstring first lineAdam Turner2022-02-201-2/+1
| | |
| | * Remove module titles in docstringsAdam Turner2022-02-191-3/+0
| | |