summaryrefslogtreecommitdiff
path: root/sphinx/domains/python.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix #9121: py domain: duplicated warning for canonical and aliasTakeshi KOMIYA2021-04-231-9/+17
|/ | | | | | A duplicated warning is emitted when both canonical and its alias objects are defined on the same document. But it should not be emitted because they're the same object, not conflicted.
* Fix #8127: py domain: Ellipsis in info-field-list causes nit-picky warningTakeshi KOMIYA2021-04-171-1/+1
| | | | | | | | | | On parsing the types, the leading dot of the ellipsis (...) is considered as a reference name. And its first dot is considered as a notation for relative type reference (ex. ".ClassName"). As a result, it was converted double dots unexpectedly. This changes the parsing rule to treat the ellipsis as a symbol, not a name.
* refactor: Use PEP-526 based variable annotation (sphinx.domains)Takeshi KOMIYA2021-03-231-14/+13
|
* Merge pull request #8991 from tk0miya/typing_OptionSpecTakeshi KOMIYA2021-03-151-11/+11
|\ | | | | refactor: Add a type alias for the option_spec of directives; OptionSpec
| * refactor: Add a type alias for the option_spec of directives; OptionSpecTakeshi KOMIYA2021-03-131-11/+11
| |
* | Merge pull request #8996 from tk0miya/7119_pending_xref_conditionsTakeshi KOMIYA2021-03-151-0/+4
|\ \ | | | | | | Fix #7119: autodoc: Broken doctree was generated by builtin_resolver
| * | Avoid a mypy warningTakeshi KOMIYA2021-03-151-1/+1
| | |
| * | Fix #7119: autodoc: Broken doctree was generated by builtin_resolverTakeshi KOMIYA2021-03-141-0/+4
| |/ | | | | | | | | The builtin_resolver() generates broken doctree unexpectedly if it contains pending_xref_condition nodes.
* | py domain: Add py:property directive to describe a property (refs: #7068)Takeshi KOMIYA2021-03-111-1/+52
|/
* Fix #7199: py domain: Add a new confval: python_use_unqualified_type_namesTakeshi KOMIYA2021-03-061-5/+32
| | | | | | Add a new config variable: python_use_unqualified_type_names. If enabled, it goes to suppress the module name of the python reference if it can be resolved.
* refactor: py domain: Put if-block for ast.Constant to the root levelTakeshi KOMIYA2021-02-031-6/+5
|
* Re-insert if isinstance(node, ast.Constant): into py _parse_annotationjfbu2021-02-031-0/+6
| | | | | | | | | | As master drop python 3.5 support, conditional if sys.version_info >= (3, 6): not needed anymore. This hunk had got lost in merge. modified: sphinx/domains/python.py
* Merge branch '3.x' into master_with_merged_3.xjfbu2021-02-021-7/+9
|\
| * py domain: Support type union operator (PEP-604) (refs: #8775)Takeshi KOMIYA2021-02-011-2/+9
| | | | | | | | | | | | Upgrade annotation parser for python domain to support type union operator introduced in PEP-604. It's available on all python interpreters.
* | Merge branch '3.x'Takeshi KOMIYA2021-01-081-1/+1
|\ \ | |/
| * refactor: Update typehints for ObjectDescription using GenericTakeshi KOMIYA2021-01-031-1/+1
| |
* | Close #5977: :var: field do not create a cross-referenceTakeshi KOMIYA2021-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Since its beginning, `:var:` field has created a cross-reference to the attribute having the same name. It is meaningful only if the attribute is documented by `py:attribute` directive. It means the `:var:` field and `:attr:` role are almost the same and conflicted. Additionally, the cross-reference points incorrect variable if the target is not documented. Thus, the cross-reference feature of `:var:` field is disabled.
* | Merge branch '3.x'Takeshi 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-201-0/+2
|\ \ | |/
| * Fix #8365: py domain: :type: and :rtype: gives false ambiguous warningsTakeshi KOMIYA2020-12-191-0/+2
| | | | | | | | | | | | The searching context like py:module and py:class are missing in the pending_xref nodes generated from info-field-lists. This sets these searching context info to them.
* | Do isortTakeshi KOMIYA2020-11-121-1/+0
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-11-121-5/+5
|\ \ | |/
| * Sort imports with isortFrançois Freitag2020-11-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Drop code for supporting py35Takeshi KOMIYA2020-11-061-7/+5
| |
* | Fix a mypy violationTakeshi KOMIYA2020-08-011-1/+1
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-08-011-0/+14
|\ \ | |/
| * Fix #8008: py domain: failed to parse a type annotation containing ellipsisTakeshi KOMIYA2020-07-301-0/+14
| | | | | | | | Fix _parse_annotation() does not support a type annotation having ellipsis.
* | Merge branch '3.x'Takeshi KOMIYA2020-07-241-12/+22
|\ \ | |/
| * fix typoTetsuo Koyama2020-07-191-1/+1
| |
| * Fix #7928: py domain: failed to resolve a type annotation for the attributeTakeshi KOMIYA2020-07-091-11/+21
| |
* | refactor: namedtuples with PEP 526Takeshi KOMIYA2020-07-161-9/+14
| | | | | | | | | | Apply PEP 526 based variable annotation style to namedtuples. It is available since python 3.6.
* | Merge branch '3.x'Takeshi KOMIYA2020-07-051-12/+15
|\ \ | |/
| * Add :noindexentry: optionJakob Lykke Andersen2020-07-041-12/+15
| | | | | | | | Fixes sphinx-doc/sphinx#7052
* | Merge tag 'v3.1.1'Takeshi KOMIYA2020-07-051-2/+4
|\ \ | |/
| * Fix #7808: autodoc: Warnings raised on variable and attribute type annotationsTakeshi KOMIYA2020-06-101-2/+4
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-05-171-13/+15
|\ \ | |/
| * Close #7596: py domain: Change a type annotation for variables to a hyperlinkTakeshi KOMIYA2020-05-041-2/+2
| |
| * refactor: py domain: Add type_to_xref() utilityTakeshi KOMIYA2020-05-041-11/+13
| |
* | py domain: Add :canonical: optionTakeshi KOMIYA2020-05-041-5/+17
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-05-041-2/+3
|\ \ | |/
| * Add stacklevel parameter to warnings.warn() callTakeshi KOMIYA2020-05-031-6/+9
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-04-301-1/+12
|\ \ | |/
| * Close #7143: py domain: Add :final: option to py:*: directivesTakeshi KOMIYA2020-04-281-1/+12
| |
* | Remove deprecated features marked as RemovedInSphinx40WarningTakeshi KOMIYA2020-04-291-118/+1
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-04-131-7/+17
|\ \ | |/
| * Merge pull request #7462 from tk0miya/7461_empty_tupleTakeshi KOMIYA2020-04-131-5/+10
| |\ | | | | | | Fix #7461: py domain: fails with IndexError for empty tuple in type annotation
| | * Fix #7461: py domain: fails with IndexError for empty tuple in type annotationTakeshi KOMIYA2020-04-121-5/+10
| | |
| * | Merge branch '3.0.x' into 3.xTakeshi KOMIYA2020-04-111-2/+7
| |\ \ | | |/
| | * Fix #7445: a return annotation ``None`` is not converted to a hyperlinkTakeshi KOMIYA2020-04-101-1/+6
| | |