You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Base collector class
- Base renderer class
- Watch feature
- Selection and rendering keys support (YAML options)
- `mkdocstrings.handlers` namespace
(when importing handlers and finding templates)
Copy file name to clipboardExpand all lines: docs/usage/handlers.md
+11-45Lines changed: 11 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,8 @@ Since version 0.18, a new, experimental Python handler is available.
14
14
It is based on [Griffe](https://github.com/mkdocstrings/griffe),
15
15
which is an improved version of [pytkdocs](https://github.com/mkdocstrings/pytkdocs).
16
16
17
-
Note that the experimental handler does not yet support third-party libraries
18
-
like Django, Marshmallow, Pydantic, etc.
19
-
It is also not completely ready to handle dynamically built objects,
20
-
like classes built with a call to `type(...)`.
21
-
For most other cases, the experimental handler will work just fine.
17
+
Note that the experimental handler does not yet support all third-party libraries
18
+
that the legacy handler supported.
22
19
23
20
If you want to keep using the legacy handler as long as possible,
24
21
you can depend on `mkdocstrings-python-legacy` directly,
@@ -51,18 +48,13 @@ dependencies = [
51
48
]
52
49
```
53
50
54
-
#### Handler options
55
-
56
-
-`setup_commands` is not yet implemented. In most cases, you won't need it,
57
-
since by default the new handler does not execute the code.
58
-
59
51
#### Selection options
60
52
61
53
WARNING: Since *mkdocstrings* 0.19, the YAML `selection` key is merged into the `options` key.
62
54
63
55
-[x]`filters` is implemented, and used as before.
64
56
-[x]`members` is implemented, and used as before.
65
-
-[]`inherited_members` is not yet implemented.
57
+
-[x]`inherited_members` is implemented.
66
58
-[x]`docstring_style` is implemented, and used as before,
67
59
except for the `restructured-text` style which is renamed `sphinx`.
68
60
Numpy-style is now built-in, so you can stop depending on `pytkdocs[numpy-style]`
@@ -83,13 +75,13 @@ WARNING: Since *mkdocstrings* 0.19, the YAML `rendering` key is merged into the
83
75
Every previous option is supported.
84
76
Additional options are available:
85
77
86
-
-`separate_signature`: Render the signature (or attribute value) in a code block below the heading,
78
+
-[x]`separate_signature`: Render the signature (or attribute value) in a code block below the heading,
87
79
instead as inline code. Useful for long signatures. If Black is installed,
88
80
the signature is formatted. Default: `False`.
89
-
-`line_length`: The maximum line length to use when formatting signatures. Default: `60`.
90
-
-`show_submodules`: Whether to render submodules of a module when iterating on children.
81
+
-[x]`line_length`: The maximum line length to use when formatting signatures. Default: `60`.
82
+
-[x]`show_submodules`: Whether to render submodules of a module when iterating on children.
91
83
Default: `False`.
92
-
-`docstring_section_style`: The style to use to render docstring sections such as attributes,
84
+
-[x]`docstring_section_style`: The style to use to render docstring sections such as attributes,
93
85
parameters, etc. Available styles: `table` (default), `list` and `spacy`. The SpaCy style
94
86
is a poor implementation of their [table style](https://spacy.io/api/doc/#init).
95
87
We are open to improvements through PRs!
@@ -99,34 +91,8 @@ See [all the handler's options](https://mkdocstrings.github.io/python/usage/).
99
91
#### Templates
100
92
101
93
Templates are mostly the same as before, but the file layout has changed,
102
-
as well as some file names. Here is the new tree:
103
-
104
-
```
105
-
📁 theme/
106
-
├── 📄 attribute.html
107
-
├── 📄 children.html
108
-
├── 📄 class.html
109
-
├── 📁 docstring/
110
-
│ ├── 📄 admonition.html
111
-
│ ├── 📄 attributes.html
112
-
│ ├── 📄 examples.html
113
-
│ ├── 📄 other_parameters.html
114
-
│ ├── 📄 parameters.html
115
-
│ ├── 📄 raises.html
116
-
│ ├── 📄 receives.html
117
-
│ ├── 📄 returns.html
118
-
│ ├── 📄 warns.html
119
-
│ └── 📄 yields.html
120
-
├── 📄 docstring.html
121
-
├── 📄 expression.html
122
-
├── 📄 function.html
123
-
├── 📄 labels.html
124
-
├── 📄 module.html
125
-
└── 📄 signature.html
126
-
```
127
-
128
-
See them [in the handler repository](https://github.com/mkdocstrings/python/tree/8fc8ea5b112627958968823ef500cfa46b63613e/src/mkdocstrings_handlers/python/templates/material). See the documentation about the Python handler templates:
0 commit comments