@@ -104,6 +104,7 @@ class PythonHandler(BaseHandler):
104
104
"show_docstring_yields" : True ,
105
105
"show_source" : True ,
106
106
"show_bases" : True ,
107
+ "show_inheritance_diagram" : False ,
107
108
"show_submodules" : False ,
108
109
"group_by_category" : True ,
109
110
"heading_level" : 2 ,
@@ -119,13 +120,15 @@ class PythonHandler(BaseHandler):
119
120
"show_labels" : True ,
120
121
"unwrap_annotated" : False ,
121
122
"parameter_headings" : False ,
123
+ "modernize_annotations" : False ,
122
124
}
123
125
"""Default handler configuration.
124
126
125
127
Attributes: General options:
126
128
find_stubs_package (bool): Whether to load stubs package (package-stubs) when extracting docstrings. Default `False`.
127
129
allow_inspection (bool): Whether to allow inspecting modules when visiting them is not possible. Default: `True`.
128
130
show_bases (bool): Show the base classes of a class. Default: `True`.
131
+ show_inheritance_diagram (bool): Show the inheritance diagram of a class using Mermaid. Default: `False`.
129
132
show_source (bool): Show the source code of this object. Default: `True`.
130
133
preload_modules (list[str] | None): Pre-load modules that are
131
134
not specified directly in autodoc instructions (`::: identifier`).
@@ -200,6 +203,7 @@ class PythonHandler(BaseHandler):
200
203
separate_signature (bool): Whether to put the whole signature in a code block below the heading.
201
204
If Black is installed, the signature is also formatted using it. Default: `False`.
202
205
unwrap_annotated (bool): Whether to unwrap `Annotated` types to show only the type without the annotations. Default: `False`.
206
+ modernize_annotations (bool): Whether to modernize annotations, for example `Optional[str]` into `str | None`. Default: `False`.
203
207
"""
204
208
205
209
def __init__ (
@@ -274,7 +278,7 @@ def load_inventory(
274
278
) -> Iterator [tuple [str , str ]]:
275
279
"""Yield items and their URLs from an inventory file streamed from `in_file`.
276
280
277
- This implements mkdocstrings' `load_inventory` "protocol" (see [`mkdocstrings.plugin`][mkdocstrings.plugin ]).
281
+ This implements mkdocstrings' `load_inventory` "protocol" (see [`mkdocstrings.plugin`][]).
278
282
279
283
Arguments:
280
284
in_file: The binary file-like object to read the inventory from.
0 commit comments