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
If `members` is a list of names, filters are applied only on the members children (not the members themselves).
73
-
If `members` is `False`, none are selected.
74
-
If `members` is `True` or an empty list, filters are applied on all members and their children.
75
-
76
-
Members affect only the first layer of objects, while filters affect the whole object-tree recursively.
77
-
78
-
Every filters is run against every object name. An object can be un-selected by a filter and re-selected by the
79
-
next one:
80
-
81
-
- `"!^_"`: exclude all objects starting with an underscore
82
-
- `"^__"`: but select all objects starting with **two** underscores
83
-
84
-
Obviously one could use a single filter instead: `"!^_[^_]"`, which is the default.
85
-
"""
86
-
87
-
default_rendering_config: dict= {
64
+
default_config: dict= {
65
+
"filters": ["!^_[^_]"],
88
66
"show_root_heading": False,
89
67
"show_root_toc_entry": True,
90
68
"show_root_full_path": True,
@@ -100,24 +78,44 @@ class PythonHandler(BaseHandler):
100
78
"heading_level": 2,
101
79
"members_order": "alphabetical",
102
80
}
103
-
"""The default rendering options.
104
-
105
-
Option | Type | Description | Default
106
-
------ | ---- | ----------- | -------
107
-
**`show_root_heading`** | `bool` | Show the heading of the object at the root of the documentation tree. | `False`
108
-
**`show_root_toc_entry`** | `bool` | If the root heading is not shown, at least add a ToC entry for it. | `True`
109
-
**`show_root_full_path`** | `bool` | Show the full Python path for the root object heading. | `True`
110
-
**`show_object_full_path`** | `bool` | Show the full Python path of every object. | `False`
111
-
**`show_root_members_full_path`** | `bool` | Show the full Python path of objects that are children of the root object (for example, classes in a module). When False, `show_object_full_path` overrides. | `False`
112
-
**`show_category_heading`** | `bool` | When grouped by categories, show a heading for each category. | `False`
113
-
**`show_if_no_docstring`** | `bool` | Show the object heading even if it has no docstring or children with docstrings. | `False`
114
-
**`show_signature`** | `bool` | Show method and function signatures. | `True`
115
-
**`show_signature_annotations`** | `bool` | Show the type annotations in method and function signatures. | `False`
116
-
**`show_source`** | `bool` | Show the source code of this object. | `True`
117
-
**`show_bases`** | `bool` | Show the base classes of a class. | `True`
118
-
**`group_by_category`** | `bool` | Group the object's children by categories: attributes, classes, functions, methods, and modules. | `True`
119
-
**`heading_level`** | `int` | The initial heading level to use. | `2`
120
-
**`members_order`** | `str` | The members ordering to use. Options: `alphabetical` - order by the members names, `source` - order members as they appear in the source file. | `alphabetical`
81
+
"""
82
+
**Headings options:**
83
+
84
+
- `heading_level` (`int`): The initial heading level to use. Default: `2`.
85
+
- `show_root_heading` (`bool`): Show the heading of the object at the root of the documentation tree
86
+
(i.e. the object referenced by the identifier after `:::`). Default: `False`.
87
+
- `show_root_toc_entry` (`bool`): If the root heading is not shown, at least add a ToC entry for it. Default: `True`.
88
+
- `show_root_full_path` (`bool`): Show the full Python path for the root object heading. Default: `True`.
89
+
- `show_root_members_full_path` (`bool`): Show the full Python path of the root members. Default: `False`.
90
+
- `show_object_full_path` (`bool`): Show the full Python path of every object. Default: `False`.
91
+
- `show_category_heading` (`bool`): When grouped by categories, show a heading for each category. Default: `False`.
92
+
93
+
**Members options:**
94
+
95
+
- `members` (`list[str] | False | None`): An explicit list of members to render. Default: `None`.
96
+
- `members_order` (`str`): The members ordering to use. Options: `alphabetical` - order by the members names,
97
+
`source` - order members as they appear in the source file. Default: `"alphabetical"`.
98
+
- `filters` (`list[str] | None`): A list of filters applied to filter objects based on their name.
99
+
A filter starting with `!` will exclude matching objects instead of including them.
100
+
The `members` option takes precedence over `filters` (filters will still be applied recursively
101
+
to lower members in the hierarchy). Default: `["!^_[^_]"]`.
102
+
- `group_by_category` (`bool`): Group the object's children by categories: attributes, classes, functions, and modules. Default: `True`.
103
+
104
+
**Docstrings options:**
105
+
106
+
- `docstring_style` (`str`): The docstring style to use: `google`, `numpy`, `sphinx`, or `None`. Default: `"google"`.
107
+
- `docstring_options` (`dict`): The options for the docstring parser. See parsers under [`pytkdocs.parsers.docstrings`][].
108
+
- `show_if_no_docstring` (`bool`): Show the object heading even if it has no docstring or children with docstrings. Default: `False`.
109
+
110
+
**Signatures/annotations options:**
111
+
112
+
- `show_signature` (`bool`): Show methods and functions signatures. Default: `True`.
113
+
- `show_signature_annotations` (`bool`): Show the type annotations in methods and functions signatures. Default: `False`.
114
+
115
+
**Additional options:**
116
+
117
+
- `show_bases` (`bool`): Show the base classes of a class. Default: `True`.
118
+
- `show_source` (`bool`): Show the source code of this object. Default: `True`.
121
119
"""# noqa: E501
122
120
123
121
def__init__( # noqa: WPS231
@@ -139,7 +137,7 @@ def __init__( # noqa: WPS231
139
137
*args: Handler name, theme and custom templates.
140
138
setup_commands: A list of python commands as strings to be executed in the subprocess before `pytkdocs`.
141
139
config_file_path: The MkDocs configuration file path.
142
-
paths: A list of paths to use as Griffe search paths.
0 commit comments