Griffe extension for inheriting docstrings.
With pip
:
pip install griffe-inherited-docstrings
With pipx
:
python3.8 -m pip install --user pipx
pipx install griffe-inherited-docstrings
With Python:
import griffe
griffe.load("...", extensions=griffe.load_extensions(["griffe_inherited_docstrings"]))
With MkDocs and mkdocstrings:
plugins:
- mkdocstrings:
handlers:
python:
options:
extensions:
- griffe_inherited_docstrings
The extension will iterate on every class and their members to set docstrings from parent classes when they are not already defined.