Close #9075: autodoc: Add a config variable autodoc_unqualified_typehints

If autodoc_unqualified_typehints feature enabled, autodoc suppresses the
leading module names of typehints of function signatures (ex.
`io.StringIO` -> `StringIO`)
This commit is contained in:
Takeshi KOMIYA
2021-12-03 01:28:10 +09:00
parent 5aa6cbbca8
commit c71ff1cd21
4 changed files with 119 additions and 0 deletions

View File

@@ -662,6 +662,13 @@ There are also config values that you can set:
.. __: https://mypy.readthedocs.io/en/latest/kinds_of_types.html#type-aliases
.. versionadded:: 3.3
.. confval:: autodoc_unqualified_typehints
If True, the leading module names of typehints of function signatures (ex.
``io.StringIO`` -> ``StringIO``). Defaults to False.
.. versionadded:: 4.4
.. confval:: autodoc_preserve_defaults
If True, the default argument values of functions will be not evaluated on