Description
Describe the bug
The documentation at https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_type_aliases incorrectly states that napoleon_use_param
must be set to True
for napoleon_type_aliases
to work:
sphinx/doc/usage/extensions/napoleon.rst
Lines 514 to 517 in a6032e8
Contrast with the extension's own docstring, which correctly notes that it is actually napoleon_preprocess_types
that must be True:
sphinx/sphinx/ext/napoleon/__init__.py
Lines 237 to 239 in a6032e8
How to Reproduce
Enable a set of aliases in napoleon_type_aliases
and set napoleon_use_param = True
; those aliases will not be used. If napoleon_preprocess_types
is set to True instead then the aliases will be used correctly.
Environment Information
Platform: win32; (Windows-10-10.0.22621-SP0) Python version: 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]) Python implementation: CPython Sphinx version: 5.3.0 Docutils version: 0.17.1 Jinja2 version: 3.1.2
Sphinx extensions
["sphinx.ext.autodoc", "sphinx.ext.napoleon"]
Additional context
No response