sphinx.ext.autodoc.typehints (autodoc_typehints) (since sphinx 2.4.0, 2020-02-09)¶
See also
Contents
Generating documents from type annotations¶
As an experimental feature, autodoc provides sphinx.ext.autodoc.typehints as an additional extension.
It extends autodoc itself to generate function document from its type annotations.
To enable the feature, please add sphinx.ext.autodoc.typehints to list of extensions and set ‘description’ to autodoc_typehints:
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autodoc.typehints']
autodoc_typehints = ‘description’
New in version 2.4 : Added as an experimental feature.
This will be integrated into autodoc core in Sphinx-3.0.