diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-12-02 19:28:10 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-12-03 12:05:49 +0300 |
commit | c71ff1cd21ce796f871adef54e8a53c0eaa9e53a (patch) | |
tree | 152af7e4d0be3572694937a3b0b0e54f746156ba /doc | |
parent | 5aa6cbbca85ddc3fe5dd93d45a7cf5073db2f334 (diff) |
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`)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/usage/extensions/autodoc.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/usage/extensions/autodoc.rst b/doc/usage/extensions/autodoc.rst index 5ac3cd171..dab09c92c 100644 --- a/doc/usage/extensions/autodoc.rst +++ b/doc/usage/extensions/autodoc.rst @@ -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 |