more_autodoc.genericalias¶
Documenter for alias, which usually manifest as type aliases.
New in version 0.6.0.
Enable sphinx_toolbox.more_autodoc.genericalias by adding the following
to the extensions variable in your conf.py:
extensions = [
...
'sphinx_toolbox.more_autodoc.genericalias',
]
For more information see https://www.sphinx-doc.org/en/master/usage/extensions#third-party-extensions .
Note
sphinx_toolbox.more_autodoc.genericalias is only supported on Python 3.7 and above.
-
class
PrettyGenericAliasDocumenter(directive, name, indent='')[source]¶ Bases:
DataDocumenterSpecialized Documenter subclass for GenericAliases, with prettier output than Sphinx’s one.
-
add_directive_header(sig)[source]¶ Add the directive’s header and options to the generated content.
- Parameters:
sig (
str) – The function/class signature.
-
-
setup(app)[source]¶ Setup
sphinx_toolbox.more_autodoc.genericalias.- Parameters:
app (
Sphinx) – The Sphinx application.- Return type: