Enrich Sphinx documentation with Python type information
This extension to Sphinx autodoc enriches class member variable and function parameter lists with type information extracted from Python type annotations.
This page is a demonstration of the tool’s capabilities; visit the project page for more information.
Usage
Ensure that you have type hints in all your classes, functions and methods.
Add description to your classes, functions and methods as a doc-string.
Use
:param name: text
to assign a description to member variables and function parameters.Register
Processor
to the eventsautodoc-process-docstring
andautodoc-before-process-signature
in Sphinx’sconf.py
.Enjoy how type information is automatically injected in the doc-string on
make html
.