Griffe extension to replace docstrings of inherited methods with cross-references to parent
For example, if a class foo.Child
inherits the method do_something
from bar.Parent
, then in the generated documentation, the docstring of Child.do_something
will appear similar to
Inherited from bar.Parent
whereas the docstring of bar.Parent.do_something
will be unaffected.
pip install griffe-inherited-method-crossrefs
After installation, to use this extension with Mkdocs and mkdocstrings, add the following to your mkdocs.yml
:
plugins:
- mkdocstrings:
handlers:
python:
options:
extensions:
- griffe_inherited_method_crossrefs