Skip to content

Commit a1bce97

Browse files
committed
docs: Move show_attribute_values option into "signatures" group
1 parent 6cf34b9 commit a1bce97

File tree

3 files changed

+44
-45
lines changed

3 files changed

+44
-45
lines changed

docs/usage/configuration/members.md

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -519,50 +519,6 @@ def function_d():
519519
////
520520
///
521521

522-
523-
[](){#option-show_attribute_values}
524-
## `show_attribute_values`
525-
526-
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
527-
<!-- - **:octicons-project-template-24: Template :material-null:** (contained in [`class.html`][class template]) -->
528-
529-
Show initial values of attributes in classes.
530-
531-
```yaml title="in mkdocs.yml (global configuration)"
532-
plugins:
533-
- mkdocstrings:
534-
handlers:
535-
python:
536-
options:
537-
show_attribute_values: true
538-
```
539-
540-
```md title="or in docs/some_page.md (local configuration)"
541-
::: path.to.object
542-
options:
543-
show_attribute_values: true
544-
```
545-
546-
```python title="package/module.py"
547-
class SomeClass:
548-
def __init__(self):
549-
self.some_attr = 1
550-
```
551-
552-
/// admonition | Preview
553-
type: preview
554-
555-
//// tab | With attribute values visible
556-
<h2><code>SomeClass</code></h2>
557-
<p>some_attr = 1</p>
558-
////
559-
560-
//// tab | With attribute values hidden
561-
<h2><code>SomeClass</code></h2>
562-
<p>some_attr</p>
563-
////
564-
///
565-
566522
[](){#option-show_submodules}
567523
## `show_submodules`
568524

docs/usage/configuration/signatures.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,49 @@ function(param1, param2=None)
483483
////
484484
///
485485

486+
[](){#option-show_attribute_values}
487+
## `show_attribute_values`
488+
489+
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
490+
<!-- - **:octicons-project-template-24: Template :material-null:** (contained in [`class.html`][class template]) -->
491+
492+
Show initial values of attributes in classes.
493+
494+
```yaml title="in mkdocs.yml (global configuration)"
495+
plugins:
496+
- mkdocstrings:
497+
handlers:
498+
python:
499+
options:
500+
show_attribute_values: true
501+
```
502+
503+
```md title="or in docs/some_page.md (local configuration)"
504+
::: path.to.object
505+
options:
506+
show_attribute_values: true
507+
```
508+
509+
```python title="package/module.py"
510+
class SomeClass:
511+
def __init__(self):
512+
self.some_attr = 1
513+
```
514+
515+
/// admonition | Preview
516+
type: preview
517+
518+
//// tab | With attribute values visible
519+
<h2><code>SomeClass</code></h2>
520+
<p>some_attr = 1</p>
521+
////
522+
523+
//// tab | With attribute values hidden
524+
<h2><code>SomeClass</code></h2>
525+
<p>some_attr</p>
526+
////
527+
///
528+
486529
[](){#option-show_overloads}
487530
## `show_overloads`
488531

src/mkdocstrings_handlers/python/_internal/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ class PythonInputOptions:
625625
show_attribute_values: Annotated[
626626
bool,
627627
_Field(
628-
group="members",
628+
group="signatures",
629629
description="Show initial values of attributes in classes.",
630630
),
631631
] = True

0 commit comments

Comments
 (0)