summaryrefslogtreecommitdiff
path: root/sphinx/domains/python.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * | refactor: py domain: Separate parse_reftarget() from type_to_xref()Takeshi KOMIYA2021-12-271-21/+29
| | |
| * | py domain: Suppress the leading "typing." module from typehintsTakeshi KOMIYA2021-12-251-1/+3
| | | | | | | | | | | | | | | | | | | | | To support creating hyperlinks to container types naturally, py domain should take fully-qualified typehints for them. But nobody wants to show "typing." module name on the signature. So this suppresses them automatically.
| * | Fix #9194: autodoc: types in typing module are not hyperlinkedTakeshi KOMIYA2021-12-251-1/+2
| | | | | | | | | | | | | | | This converts types in typing module to valid references when `autodoc_unqualified_typehints` option enabled.
| * | Fix autodoc: Failed to parse Literal type in py36 and py37Takeshi KOMIYA2021-12-251-1/+7
| |/
* | refactor: Remove RemovedInSphinx50Warning (partially)Takeshi KOMIYA2021-12-171-29/+2
|/
* py domain: Allow "~" prefix as a prefix of typehints in signatureTakeshi KOMIYA2021-11-301-5/+19
| | | | | | | | | | Now python domain supports the "~" prefix at the beginning of the typehints of the function signatures: .. py:function:: func(x: ~typing.Dict) It's rescognized as the same as python reference roles do (ex. :py:class:`~typing.Dict`).
* Fix #9899: py domain: Allows cross-reference specifier to :type: optionTakeshi KOMIYA2021-11-291-3/+15
|
* Fix the type of deprecation warning for get_signature_prefix (refs: #9833)Takeshi KOMIYA2021-11-111-2/+2
|
* Use warnings.warn and deprecation warningJakob Lykke Andersen2021-11-091-4/+6
|
* Fix lint errorsJakob Lykke Andersen2021-11-091-4/+6
|
* Make fallback for changed get_signature_prefix()Jakob Lykke Andersen2021-11-091-1/+7
| | | | Fixes sphinx-doc/sphinx#9832
* Fix #9775: py domain: Literal typehint was converted to a cross referenceTakeshi KOMIYA2021-10-301-1/+5
|
* Support docutils-0.18: Consume iterator of Element.traverse()Takeshi KOMIYA2021-10-271-1/+1
| | | | | | | Since 0.18, Element.traverse() returns an iterator instead of intermediate object. As a result, the return value is always considered as truthy value. And it becomes fragile when the caller modifies the doctree on the loop.
* Merge branch '4.x' into 9697_property_with_parensTakeshi KOMIYA2021-10-091-41/+81
|\
| * js/py nodes, update arglist renderingJakob Lykke Andersen2021-10-031-1/+2
| |
| * py nodes, Constant NoneJakob Lykke Andersen2021-10-021-0/+2
| |
| * py nodes, PyObject annoJakob Lykke Andersen2021-10-021-1/+9
| |
| * py nodes, get_signature_prefix cleanupJakob Lykke Andersen2021-10-021-4/+1
| |
| * py nodes, PyProperty get_signature_prefixJakob Lykke Andersen2021-10-021-6/+9
| |
| * py nodes, PyMethod get_signature_prefixJakob Lykke Andersen2021-10-021-13/+15
| |
| * py nodes, PyClassLike, get_signature_prefixJakob Lykke Andersen2021-10-021-3/+4
| |
| * py nodes, PyFunction get_signature_prefixJakob Lykke Andersen2021-10-021-3/+4
| |
| * py nodes, prep for get_signature_prefix changeJakob Lykke Andersen2021-10-021-3/+6
| |
| * py nodes, PyPropertyJakob Lykke Andersen2021-10-021-1/+4
| |
| * py nodes, PyAttribute valueJakob Lykke Andersen2021-10-021-1/+5
| |
| * py nodes, PyAttribute typeJakob Lykke Andersen2021-10-021-1/+4
| |
| * py nodes, PyVariable valueJakob Lykke Andersen2021-10-021-1/+5
| |
| * py nodes, PyVariable typeJakob Lykke Andersen2021-10-021-1/+3
| |
| * py nodes, arglistJakob Lykke Andersen2021-10-021-3/+3
| |
| * py nodes, TupleJakob Lykke Andersen2021-10-021-1/+3
| |
| * py nodes, ListJakob Lykke Andersen2021-10-021-1/+3
| |
| * py nodes, BitOrJakob Lykke Andersen2021-10-021-1/+3
| |
* | Fix #9697: An index entry with parens was registered for py:methodTakeshi KOMIYA2021-10-031-1/+1
|/
* Fix typos discovered by codespellChristian Clauss2021-09-081-1/+1
|
* Fix #9576: py domain: Literal typehint was converted to a cross referenceTakeshi KOMIYA2021-09-031-2/+10
| | | | | The content of Literal typehint should not be converted to cross references.
* Fix #9585: py:property directive does not create a hyperlink for typesTakeshi KOMIYA2021-08-311-1/+2
|
* Cloase #9445: :py:property: directive now supports :classmethod: optionTakeshi KOMIYA2021-07-171-2/+6
| | | | | Since python 3.9, `classmethod` starts to support creating a "class property". This allows to describe it.
* Merge branch '4.x' into 9427Takeshi KOMIYA2021-07-111-22/+35
|\
| * fields, call roles instead of making a pending_xrefJakob Lykke Andersen2021-06-031-8/+18
| | | | | | | | Except for py which has mixins that assumes a single pending_xref
| * Close #9268: python_use_unqualified_type_names supports type fieldTakeshi KOMIYA2021-06-031-0/+10
| |
| * Fix #9280: py domain: "exceptions" module is not displayedTakeshi KOMIYA2021-05-301-6/+3
| | | | | | | | | | | | | | | | | | | | Since v0.2, python domain gives a special treatment for the exceptions module to suppress its name on documenting exception classes. It had been worthy on python2 era. But the module has been removed since python3. Therefore, the special treatment becomes harmful for user libraries. This removes it to render module names correctly. Note: Now we've only supported python3. So this is not incompatible.
| * Merge pull request #9258 from tk0miya/1874_piped_types_in_info-field-listTakeshi KOMIYA2021-05-231-1/+1
| |\ | | | | | | Close #1874: py domain: Support union types using `|` in info-field-list
| | * Close #1874: py domain: Support union types using `|` in info-field-listTakeshi KOMIYA2021-05-221-1/+1
| | |
| * | refactor: reduce calls of find_pending_xref_conditions (refs: #9240)Takeshi KOMIYA2021-05-221-4/+0
| |/ | | | | | | | | | | | | After #9246, `find_pending_xref_conditions()` should be only called from intended modules. At present, the Python Domain is the only module to call it intendedly. Therefore, this removes the needless calls of the utility function from "unintended" modules.
| * Merge branch '4.0.x' into 4.xTakeshi KOMIYA2021-05-111-3/+7
| |\
| * | refactor: Add Optional to type annotationsTakeshi KOMIYA2021-05-101-3/+3
| | |
* | | Closes #9418: Fix missing bracket for empty Callable annotations.Thomas Jungers2021-07-091-4/+8
| |/ |/|
* | Fix #9205: py domain: canonical option causes xref resolution errorTakeshi KOMIYA2021-05-111-3/+7
|/ | | | | | The :canonical: option causes "more than one target for cross-reference" warning because the class having the same name is registered.
* Merge pull request #9118 from chrisjsewell/fix-typingTakeshi KOMIYA2021-04-241-1/+1
|\ | | | | 🐛 FIX: `Config.__getitem__` typing
| * remove type: ignoreChris Sewell2021-04-231-1/+1
| |