Skip to content

Commit fa91dd1

Browse files
committed
docs: Update docs
1 parent 6407cf4 commit fa91dd1

File tree

3 files changed

+24
-28
lines changed

3 files changed

+24
-28
lines changed

docs/css/mkdocstrings.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/* Indentation. */
22
div.doc-contents:not(.first) {
33
padding-left: 25px;
4-
border-left: 4px solid rgba(230, 230, 230);
5-
margin-bottom: 80px;
4+
border-left: .05rem solid var(--md-typeset-table-color);
65
}
76

87
/* Mark external links as such */

docs/usage.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Option | Description
4141

4242
### Rendering
4343

44-
::: mkdocstrings_handlers.python.renderer.PythonRenderer.default_config
44+
::: mkdocstrings_handlers.python.handler.PythonHandler.default_rendering_config
4545
rendering:
4646
show_root_toc_entry: false
4747

@@ -162,8 +162,7 @@ Here are some CSS rules for the
162162
/* Indentation. */
163163
div.doc-contents:not(.first) {
164164
padding-left: 25px;
165-
border-left: .05rem solid var(--md-default-fg-color--lightest);
166-
margin-bottom: 80px;
165+
border-left: .05rem solid var(--md-typeset-table-color);
167166
}
168167
```
169168

src/mkdocstrings_handlers/python/handler.py

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -74,29 +74,27 @@ class PythonHandler(BaseHandler):
7474
"members_order": rendering.Order.alphabetical.value,
7575
"docstring_section_style": "table",
7676
}
77-
"""The default rendering options.
78-
79-
Option | Type | Description | Default
80-
------ | ---- | ----------- | -------
81-
**`show_root_heading`** | `bool` | Show the heading of the object at the root of the documentation tree. | `False`
82-
**`show_root_toc_entry`** | `bool` | If the root heading is not shown, at least add a ToC entry for it. | `True`
83-
**`show_root_full_path`** | `bool` | Show the full Python path for the root object heading. | `True`
84-
**`show_object_full_path`** | `bool` | Show the full Python path of every object. | `False`
85-
**`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`
86-
**`show_category_heading`** | `bool` | When grouped by categories, show a heading for each category. | `False`
87-
**`show_if_no_docstring`** | `bool` | Show the object heading even if it has no docstring or children with docstrings. | `False`
88-
**`show_signature`** | `bool` | Show method and function signatures. | `True`
89-
**`show_signature_annotations`** | `bool` | Show the type annotations in method and function signatures. | `False`
90-
**`separate_signature`** | `bool` | Whether to put the whole signature in a code block below the heading. | `False`
91-
**`line_length`** | `int` | Maximum line length when formatting code. | `60`
92-
**`merge_init_into_class`** | `bool` | Whether to merge the `__init__` method into the class' signature and docstring. | `False`
93-
**`show_source`** | `bool` | Show the source code of this object. | `True`
94-
**`show_bases`** | `bool` | Show the base classes of a class. | `True`
95-
**`show_submodules`** | `bool` | When rendering a module, show its submodules recursively. | `True`
96-
**`group_by_category`** | `bool` | Group the object's children by categories: attributes, classes, functions, methods, and modules. | `True`
97-
**`heading_level`** | `int` | The initial heading level to use. | `2`
98-
**`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`
99-
**`docstring_section_style`** | `str` | The style used to render docstring sections. Options: `table`, `list`, `spacy`. | `table`
77+
"""
78+
Attributes: Default rendering options:
79+
show_root_heading (bool): Show the heading of the object at the root of the documentation tree. Default: `False`.
80+
show_root_toc_entry (bool): If the root heading is not shown, at least add a ToC entry for it. Default: `True`.
81+
show_root_full_path (bool): Show the full Python path for the root object heading. Default: `True`.
82+
show_root_members_full_path (bool): Show the full Python path of every object. Default: `False`.
83+
show_object_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. Default: `False`.
84+
show_category_heading (bool): When grouped by categories, show a heading for each category. Default: `False`.
85+
show_if_no_docstring (bool): Show the object heading even if it has no docstring or children with docstrings. Default: `False`.
86+
show_signature (bool): Show method and function signatures. Default: `True`.
87+
show_signature_annotations (bool): Show the type annotations in method and function signatures. Default: `False`.
88+
separate_signature (bool): Whether to put the whole signature in a code block below the heading. Default: `False`.
89+
line_length (int): Maximum line length when formatting code. Default: `60`.
90+
merge_init_into_class (bool): Whether to merge the `__init__` method into the class' signature and docstring. Default: `False`.
91+
show_source (bool): Show the source code of this object. Default: `True`.
92+
show_bases (bool): Show the base classes of a class. Default: `True`.
93+
show_submodules (bool): When rendering a module, show its submodules recursively. Default: `True`.
94+
group_by_category (bool): Group the object's children by categories: attributes, classes, functions, methods, and modules. Default: `True`.
95+
heading_level (int): The initial heading level to use. Default: `2`.
96+
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. Default: `alphabetical`.
97+
docstring_section_style (str): The style used to render docstring sections. Options: `table`, `list`, `spacy`. Default: `table`.
10098
""" # noqa: E501
10199

102100
def __init__(self, *args, **kwargs) -> None:

0 commit comments

Comments
 (0)