Skip to content

Commit 82f5eb9

Browse files
committed
docs: Add usage instructions in readme
1 parent 08e4f5e commit 82f5eb9

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,28 @@ Griffe extension for inheriting docstrings.
99
## Installation
1010

1111
See [Insiders installation](https://mkdocstrings.github.io/mkdocstrings/insiders/installation.md).
12+
13+
## Usage
14+
15+
With Python:
16+
17+
```python
18+
import griffe
19+
20+
griffe.load("...", extensions=griffe.load_extensions(["griffe_inherited_docstrings"]))
21+
```
22+
23+
With MkDocs and mkdocstrings:
24+
25+
```yaml
26+
plugins:
27+
- mkdocstrings:
28+
handlers:
29+
python:
30+
options:
31+
extensions:
32+
- griffe_inherited_docstrings
33+
```
34+
35+
The extension will iterate on every class and their members
36+
to set docstrings from parent classes when they are not already defined.

0 commit comments

Comments
 (0)