diff --git a/doc/usage/extensions/napoleon.rst b/doc/usage/extensions/napoleon.rst index 066c56e2d..bd2bcad3f 100644 --- a/doc/usage/extensions/napoleon.rst +++ b/doc/usage/extensions/napoleon.rst @@ -301,6 +301,7 @@ sure that "sphinx.ext.napoleon" is enabled in `conf.py`:: napoleon_use_ivar = False napoleon_use_param = True napoleon_use_rtype = True + napoleon_preprocess_types = False napoleon_type_aliases = None napoleon_attr_annotations = True @@ -510,6 +511,16 @@ sure that "sphinx.ext.napoleon" is enabled in `conf.py`:: :returns: *bool* -- True if successful, False otherwise +.. confval:: napoleon_preprocess_types + + True to convert the type definitions in the docstrings as references. + Defaults to *True*. + + .. versionadded:: 3.2.1 + .. versionchanged:: 3.5 + + Do preprocess the Google style docstrings also. + .. confval:: napoleon_type_aliases A mapping to translate type names to other names or references. Works @@ -570,4 +581,4 @@ sure that "sphinx.ext.napoleon" is enabled in `conf.py`:: .. versionadded:: 1.8 .. versionchanged:: 3.5 - Support ``params_style`` and ``returns_style`` \ No newline at end of file + Support ``params_style`` and ``returns_style`` diff --git a/sphinx/ext/napoleon/__init__.py b/sphinx/ext/napoleon/__init__.py index ba8f62a18..8e513a9d0 100644 --- a/sphinx/ext/napoleon/__init__.py +++ b/sphinx/ext/napoleon/__init__.py @@ -240,7 +240,7 @@ class Config: :returns: *bool* -- True if successful, False otherwise napoleon_preprocess_types : :obj:`bool` (Defaults to False) - Enable the type preprocessor for numpy style docstrings. + Enable the type preprocessor. napoleon_type_aliases : :obj:`dict` (Defaults to None) Add a mapping of strings to string, translating types in numpy