summaryrefslogtreecommitdiff
path: root/sphinx/util/docfields.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix #8365: py domain: :type: and :rtype: gives false ambiguous warningsTakeshi KOMIYA2020-12-191-0/+1
| | | | | | 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.
* Sort imports with isortFrançois Freitag2020-11-111-3/+3
| | | | | | | | | | | | 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.
* Add stacklevel parameter to warnings.warn() callTakeshi KOMIYA2020-05-031-2/+2
|
* A happy new year!Takeshi KOMIYA2020-01-011-1/+1
|
* Fix #6474: ``DocFieldTransformer`` raises AttributeErrorTakeshi KOMIYA2019-08-021-1/+8
|
* Fix type annotation for python 3.5.1Takeshi KOMIYA2019-07-131-3/+4
|
* Migrate to py3 style type annotation: sphinx.util.docfieldsTakeshi KOMIYA2019-06-031-67/+32
|
* Add ObjectDescription.get_field_type_map()Takeshi KOMIYA2019-03-231-5/+7
| | | | | Conceal caching mechanism of Field classes to ObjectDescription class. This deprecates DocFieldTransformer.preprocess_field_types().
* Clean up import for annotationsTakeshi KOMIYA2019-03-061-1/+0
|
* Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\
| * A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |
* | Merge pull request #5509 from stephenfin/remove-future-importsTakeshi KOMIYA2018-12-171-1/+0
|\ \ | | | | | | Remove future imports
| * | py3: Remove (most) __future__ importsStephen Finucane2018-12-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two used: - print_function - absolute_import Both of these are mandatory in Python 3.0 onwards [1] and can therefore be removed...mostly. Unfortunately, mypy is still running in Python 2.7 mode, meaning we need the 'print_function' future wherever we're calling 'print' with the 'file' argument. There's also a single 'absolute_import' future that must be retained as its removal breaks a test for as-yet unknown reasons. TODOs are added to resolve both issues in the future. [1] https://docs.python.org/3/library/__future__.html Signed-off-by: Stephen Finucane <stephen@that.guru>
* | | Remove unnecessary encoding cookie from Python source filesJon Dufresne2018-12-161-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, the default encoding of source files is utf-8. The encoding cookie is now unnecessary and redundant so remove it. For more details, see the docs: https://docs.python.org/3/howto/unicode.html#the-string-type > The default encoding for Python source code is UTF-8, so you can > simply include a Unicode character in a string literal ... Includes a fix for the flake8 header checks to stop expecting an encoding cookie.
* | Use Python 3 super() argument-less syntaxJon Dufresne2018-12-151-2/+2
| | | | | | | | | | | | The form is less verbose and more idiomatic for Python 3 only code. https://docs.python.org/3/library/functions.html#super
* | Replace all "unicode" type by "str"Takeshi KOMIYA2018-12-151-22/+22
| |
* | Fix annotaions for docfieldsTakeshi KOMIYA2018-12-121-15/+15
| |
* | Merge pull request #5740 from tk0miya/fix_typehints_for_TextlikeNodeTakeshi KOMIYA2018-12-101-3/+3
|\ \ | | | | | | Add TextlikeNode type for docfields
| * | Add TextlikeNode type for docfieldsTakeshi KOMIYA2018-12-101-3/+3
| | |
* | | Fix annotationsTakeshi KOMIYA2018-12-101-1/+1
|/ /
* | Fix annotations for cpp domainTakeshi KOMIYA2018-12-041-1/+1
| |
* | Fix annotations for utilTakeshi KOMIYA2018-11-301-34/+43
| |
* | Fix annotations for minor methods and functionsTakeshi KOMIYA2018-11-301-3/+3
| |
* | Add sphinx.util.typing:unicode to help mypy-3 migrationTakeshi KOMIYA2018-11-241-0/+1
| |
* | Use super() to call parent class's methodJon Dufresne2018-11-111-2/+2
| |
* | Merge branch 'master' into HEADTakeshi KOMIYA2018-09-221-2/+4
|\ \ | |/
| * Merge branch '1.8' into 5426_TypeError_for_class_attributesTakeshi KOMIYA2018-09-221-1/+2
| |\
| | * Fix #5432: py domain: :type: field can't process :term: referencesTakeshi KOMIYA2018-09-221-1/+2
| | |
| * | Fix py domain: TypeError has been raised for class attribute (ref: #5426)Takeshi KOMIYA2018-09-221-1/+2
| |/
* | Remove unnecessary object from class definitionsJon Dufresne2018-09-111-2/+2
|/ | | | | In Python 3, all classes are new-style classes. The object in the definition is redundant and unnecessary.
* Merge branch '1.7'Takeshi KOMIYA2018-03-181-3/+2
|\
| * Revert "Use typing.TYPE_CHECKING for typehints"Takeshi KOMIYA2018-03-131-3/+2
| | | | | | | | This reverts commit a073e17537c2aacaac305feadea58d4473ec97f4.
* | Merge branch '1.7'Takeshi KOMIYA2018-02-181-2/+3
|\ \ | |/
| * Use typing.TYPE_CHECKING for typehintsTakeshi KOMIYA2018-02-141-2/+3
| |
* | Merge pull request #4047 from AWhetter/fix_2979_2Rob Ruana2018-02-031-6/+23
|\ \ | |/ |/| Properties can have types documented with :type:
| * Properties can have types documented with :type:Ashley Whetter2017-09-061-6/+23
| |
* | A happy new year!Takeshi KOMIYA2018-01-011-1/+1
|/
* Merge branch 'stable' into 1.6-releasejfbu2017-05-051-1/+2
|\
| * Fix #3685: AttributeError when using 3rd party domainsTakeshi KOMIYA2017-05-031-1/+2
| |
* | Merge branch 'stable'Takeshi KOMIYA2017-03-261-1/+1
|\ \ | |/
| * Year++Takeshi KOMIYA2017-03-261-1/+1
| |
* | Correct missing space before type annotationjfbu2017-03-121-4/+4
| |
* | Split some long type-checking annotation linesjfbu2017-03-121-12/+39
| |
* | Merge branch 'stable'jfbu2017-03-121-19/+22
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts resolved: sphinx/domains/cpp.py sphinx/domains/python.py sphinx/texinputs/sphinx.sty sphinx/util/docfields.py sphinx/writers/latex.py tests/test_build_latex.py Also updated: sphinx/domains/__init__.py
| * Make docfield xref changes backwards compatibleJakob Lykke Andersen2017-03-111-21/+22
| |
| * Add callback on domains for xrefs from fields.Jakob Lykke Andersen2017-03-081-15/+16
| | | | | | | | | | Fixes sphinx-doc/sphinx#2607. Fixes sphinx-doc/sphinx#2665.
* | Upgrade to mypy-0.5Takeshi KOMIYA2017-03-031-1/+1
| |
* | Fix mypy violationsTakeshi KOMIYA2017-02-081-3/+4
| |
* | Set 'document' attribute of new node in DocFieldTransformerHenrik Alsing Friberg2017-01-191-0/+1
| |