summaryrefslogtreecommitdiff
path: root/sphinx/util
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add support for PEP 585 genericsJames2021-07-171-0/+2
|/
* Fix #9404: autodoc: autoclass raises TypeError for dict-like objectTakeshi KOMIYA2021-07-111-1/+1
| | | | | The autoclass directive raises TypeError when dict-like object (not a class) is given as a subject.
* Merge pull request #9415 from ↵Takeshi KOMIYA2021-07-091-20/+23
|\ | | | | | | | | tk0miya/9362_AttributeError_for_subclass_of_empty_tuple Fix #9362: autodoc: AttributeError is raised for a subclass of Tuple[()]
| * Fix #9362: autodoc: AttributeError is raised for a subclass of Tuple[()]Takeshi KOMIYA2021-07-071-20/+23
| |
* | Fix typoEisuke Kawashima2021-07-083-3/+3
|/
* Merge branch '4.0.x' into 4.xTakeshi KOMIYA2021-06-301-0/+17
|\
| * Revert the removal of sphinx.util:force_decode()Takeshi KOMIYA2021-06-131-0/+17
| | | | | | | | | | | | | | | | | | | | After the release of 4.0.0, some 3rd party extensions have became not working with the latest Sphinx because `force_decode()` function was removed. It was deprecated since Sphinx-2.0 and warned for the removal since 3.0. This reverts the removal and extends its deprecation period to 5.0.0. I hope it helps users of these extensions.
* | C++, C, support digit separators in literalsJakob Lykke Andersen2021-06-241-10/+11
| |
* | Merge branch '4.0.x' into 4.xTakeshi KOMIYA2021-06-132-9/+9
|\ \ | |/
| * Fix mypy violations (delete type: ignore ) (with mypy-0.900)Junya Fukuda2021-06-132-9/+9
| |
| * Fix type annotations (for jinja2)Takeshi KOMIYA2021-05-193-10/+10
| | | | | | | | | | | | Jinja2 starts to bundle its typehints since v3.0. As a result, mypy warns "ignore" hint is needless. This removes them all to keep it valid.
| * Support jinja2-3.0Takeshi KOMIYA2021-05-191-2/+8
| | | | | | | | | | | | Since jinja2-3.0, some utility functions like contextfunction and environmentfilter are renamed to new name. This follows the updates to support jinja2-3.0 or above.
* | DocFields, small fixesJakob Lykke Andersen2021-06-031-8/+5
| |
* | fields, call roles instead of making a pending_xrefJakob Lykke Andersen2021-06-031-24/+55
| | | | | | | | Except for py which has mixins that assumes a single pending_xref
* | deprecate sphinx.ext.autosummary._appTakeshi KOMIYA2021-05-311-2/+5
| |
* | Close #9272: autodoc: Render enum values for the default argument value betterTakeshi KOMIYA2021-05-301-2/+5
| |
* | Fix #9250: autodoc: The inherited method not having docstring is wrongly parsedTakeshi KOMIYA2021-05-231-8/+17
| | | | | | | | | | | | `sphinx.util.inspect.getdoc()` clean the docstring up if the method is inherited and not having docstring. That causes indentations are removed on processing it.
* | Fix #9224: info-field-list does not support a type containing spaceTakeshi KOMIYA2021-05-151-1/+1
| | | | | | | | | | | | | | | | | | So far, DocFieldTransformer has split the field name for `:type:` and `:param:` at the first whitespace. Therefore, it does not allow to use a type containing whitespace (ex. `Dict[str, str]`). This changes the splitting logic to divide the field name at the last whitespace (a.k.a `rstrip()`). It allows to use whitespaces on types.
* | Fix type annotations (for jinja2)Takeshi KOMIYA2021-05-133-10/+10
| | | | | | | | | | | | Jinja2 starts to bundle its typehints since v3.0. As a result, mypy warns "ignore" hint is needless. This removes them all to keep it valid.
* | Fix #9195: autodoc: The args of `typing.Literal` are wrongly renderedTakeshi KOMIYA2021-05-111-0/+6
| | | | | | | | They should be rendered as "repr" form.
* | refactor: Add Optional to type annotationsTakeshi KOMIYA2021-05-101-3/+3
| |
* | [IMP] util: detect incorrect locale_dirs pathMartin Trigaux2021-05-081-1/+4
| | | | | | | | | | In case the config is incorrect (e.g. wrong relative path), it is silently ignored. This makes it easier for debugging.
* | Merge pull request #9162 from tk0miya/jinja2-3.0Takeshi KOMIYA2021-05-061-2/+8
|\ \ | | | | | | Support jinja2-3.0
| * | Support jinja2-3.0Takeshi KOMIYA2021-05-041-2/+8
| | | | | | | | | | | | | | | | | | Since jinja2-3.0, some utility functions like contextfunction and environmentfilter are renamed to new name. This follows the updates to support jinja2-3.0 or above.
* | | refactor: Add Optional to type annotationsTakeshi KOMIYA2021-05-036-19/+22
|/ /
* | Merge pull request #9159 from tk0miya/8588_nested_autodoc_type_aliasesTakeshi KOMIYA2021-05-031-3/+84
|\ \ | | | | | | Fix #8588: autodoc_type_aliases does not support dotted name
| * | Close #8588: autodoc: autodoc_type_aliases supports dotted nameTakeshi KOMIYA2021-05-031-3/+84
| | | | | | | | | | | | | | | It allows users to define an alias for a class with module name like `foo.bar.BazClass`.
* | | Fix #8597: autodoc: metadata only docstring is treated as undocumentedTakeshi KOMIYA2021-05-021-5/+18
|/ / | | | | | | | | The metadata in docstring is invisible content. Therefore docstring having only metadata should be treated as undocumented.
* | Add unicode multiplicationOz N Tiram2021-04-271-0/+2
| | | | | | | | | | Since checkmark already exists, it makes sense to have this too. Both signs are used as "yes" or "no" replacements in text UIs.
* | Merge branch '4.0.x' into 4.xTakeshi KOMIYA2021-04-191-19/+36
|\ \ | |/
| * Fix #8818: autodoc: Super class having ``Any`` arguments causes nit-picky ↵Takeshi KOMIYA2021-04-181-19/+36
| | | | | | | | | | | | | | | | warning On generating the base class information, unexpected nit-picky warning for ``typing.Any`` was emitted. This fixes it by using `~` prefix on generating a cross-reference to make it valid.
* | Merge pull request #9097 from peterbell10/parallel-task-sleepTakeshi KOMIYA2021-04-171-4/+8
|\ \ | |/ |/| Remove unnecesary sleep when submitting parallel tasks
| * Remove redundant assignmentPeter Bell2021-04-171-1/+1
| |
| * Remove unnecesary sleep when submitting parallel tasksPeter Bell2021-04-131-5/+9
| |
* | Merge branch '3.x'Takeshi KOMIYA2021-04-111-2/+12
|\ \ | |/
| * Fix autodoc: Async staticmethods/ classmethods are considered as not asyncTakeshi KOMIYA2021-04-111-2/+12
| | | | | | | | | | | | | | | | | | | | Since 3.10.0a7, the instances of staticmethod and classmethod have `__wrapped__` attribute. It confuses sphinx.util.inspect:iscoroutinefunction(). refs: * https://docs.python.org/3.10/whatsnew/3.10.html#other-language-changes * https://bugs.python.org/issue43682
* | refactor: Add Optional to type annotationsTakeshi KOMIYA2021-04-081-1/+1
| |
* | Merge branch 'master' into refactor_type_annotation2Takeshi KOMIYA2021-04-081-6/+6
|\ \
| * | refactor: Lazy loading is not needed for type annotationsTakeshi KOMIYA2021-04-041-6/+6
| | |
* | | refactor: use raw Type for type annotationsTakeshi KOMIYA2021-04-047-17/+17
|/ /
* | Merge branch 'master' into typosTakeshi KOMIYA2021-03-2725-900/+236
|\ \
| * | Fix #8992: autodoc: Failed to resolve types.TracebackType type annotationTakeshi KOMIYA2021-03-171-6/+12
| | | | | | | | | | | | | | | The builtin module, ``types.TracebackType`` does not have correct module name. This allows to refer it automatically.
| * | refactor: Add a type alias for the option_spec of directives; OptionSpecTakeshi KOMIYA2021-03-131-3/+12
| | |
| * | refactor: Use PEP-526 based variable annotation (sphinx.util)Takeshi KOMIYA2021-03-1015-53/+54
| | |
| * | Merge branch '3.x'Takeshi KOMIYA2021-03-061-2/+15
| |\ \ | | |/
| * | Fix #7199: py domain: Add a new confval: python_use_unqualified_type_namesTakeshi KOMIYA2021-03-061-3/+3
| | | | | | | | | | | | | | | | | | 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.
| * | Filter pending_xref_condition node on failed resolutionTakeshi KOMIYA2021-03-061-0/+10
| | |
| * | autodoc: an imported TypeVar is not resolved (refs: #8415)Takeshi KOMIYA2021-02-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, a TypeVar is rendered without module name. As a result, it could not be resolved if it is imported from other modules. This prepends its module name and make it resolvable. This is available only in Python 3.7 or above. As a side effect, all of TypeVars are displayed with module name. It should be fixed in latter step (refs: #7119)
| * | Fix #8917: autodoc: Raises a warning if function has wrong __globals__ valueTakeshi KOMIYA2021-02-261-3/+12
| | | | | | | | | | | | | | | | | | `sphinx.util.inspect:signature()` crashes with AttributeError when subject has wrong `__globals__` value. This ignores the error on building.
| * | refactor: Remove meaningless type annotationsTakeshi KOMIYA2021-02-171-2/+2
| | |