Skip to content

Commit dcb489d

Browse files
committed
docs: Make sure each option is documented
1 parent aace13e commit dcb489d

File tree

7 files changed

+129
-64
lines changed

7 files changed

+129
-64
lines changed

docs/usage/configuration/docstrings.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Docstrings options
22

3+
[](){#option-docstring_style}
34
## `docstring_style`
45

56
- **:octicons-package-24: Type [`str`][] :material-equal: `"google"`{ title="default value" }**
@@ -84,6 +85,7 @@ def greet(name: str) -> str:
8485
////
8586
///
8687

88+
[](){#option-docstring_options}
8789
## `docstring_options`
8890

8991
- **:octicons-package-24: Type [`dict`][] :material-equal: `{}`{ title="default value" }**
@@ -158,6 +160,7 @@ ok
158160
////
159161
///
160162

163+
[](){#option-docstring_section_style}
161164
## `docstring_section_style`
162165

163166
- **:octicons-package-24: Type [`str`][] :material-equal: `"table"`{ title="default value" }**
@@ -249,6 +252,7 @@ by reserving more horizontal space on the second column.
249252
////
250253
///
251254

255+
[](){#option-merge_init_into_class}
252256
## `merge_init_into_class`
253257

254258
- **:octicons-package-24: Type [`bool`][] :material-equal: `False`{ title="default value" }**
@@ -320,6 +324,7 @@ class Thing:
320324
////
321325
///
322326

327+
[](){#option-relative_crossrefs}
323328
## `relative_crossrefs`
324329

325330
[:octicons-heart-fill-24:{ .pulse } Sponsors only](../../insiders/index.md){ .insiders } —
@@ -432,6 +437,7 @@ class Class:
432437
433438
INFO: **There is an alternative, third-party Python handler that handles relative references: [mkdocstrings-python-xref](https://github.com/analog-garage/mkdocstrings-python-xref).**
434439
440+
[](){#option-scoped_crossrefs}
435441
## `scoped_crossrefs`
436442
437443
[:octicons-heart-fill-24:{ .pulse } Sponsors only](../../insiders/index.md){ .insiders } —
@@ -452,7 +458,7 @@ The following order is applied when resolving a name in a given scope:
452458

453459
In practice, it means that the name is first looked up in members, then it is compared against the parent name (only if it's a class), then it is looked up in siblings. It continues climbing up the object tree until there's no parent, in which case it raises a name resolution error.
454460

455-
Cross-referencing an imported object will directly link to this object if the objects inventory of the project it comes from was [loaded][import]. You won't be able to cross-reference it within your own documentation with scoped references, if you happen to be rendering this external object too. In that case, you can use an absolute reference or a [relative][relative_crossrefs] one instead.
461+
Cross-referencing an imported object will directly link to this object if the objects inventory of the project it comes from was [loaded][inventories]. You won't be able to cross-reference it within your own documentation with scoped references, if you happen to be rendering this external object too. In that case, you can use an absolute reference or a [relative][relative_crossrefs] one instead.
456462

457463
Another limitation is that you won't be able to reference an external package if its name can be resolved in the current object's scope.
458464

@@ -541,6 +547,7 @@ class Class:
541547
542548
///
543549
550+
[](){#option-show_if_no_docstring}
544551
## `show_if_no_docstring`
545552
546553
- **:octicons-package-24: Type [`bool`][] :material-equal: `False`{ title="default value" }**
@@ -610,6 +617,7 @@ class ClassWithoutDocstring:
610617
////
611618
///
612619

620+
[](){#option-show_docstring_attributes}
613621
## `show_docstring_attributes`
614622

615623
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -662,6 +670,7 @@ class Class:
662670
////
663671
///
664672

673+
[](){#option-show_docstring_functions}
665674
## `show_docstring_functions`
666675

667676
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -736,7 +745,7 @@ class Class:
736745
////
737746
///
738747

739-
748+
[](){#option-show_docstring_classes}
740749
## `show_docstring_classes`
741750

742751
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -795,6 +804,7 @@ class Class:
795804
////
796805
///
797806

807+
[](){#option-show_docstring_modules}
798808
## `show_docstring_modules`
799809

800810
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -851,6 +861,7 @@ Modules:
851861
////
852862
///
853863

864+
[](){#option-show_docstring_description}
854865
## `show_docstring_description`
855866

856867
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -914,6 +925,7 @@ class Class:
914925
////
915926
///
916927

928+
[](){#option-show_docstring_examples}
917929
## `show_docstring_examples`
918930

919931
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -967,6 +979,7 @@ hello
967979
////
968980
///
969981

982+
[](){#option-show_docstring_other_parameters}
970983
## `show_docstring_other_parameters`
971984

972985
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -1017,6 +1030,7 @@ def do_something(**kwargs):
10171030
////
10181031
///
10191032

1033+
[](){#option-show_docstring_parameters}
10201034
## `show_docstring_parameters`
10211035

10221036
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -1067,6 +1081,7 @@ def do_something(whatever: int = 0):
10671081
////
10681082
///
10691083

1084+
[](){#option-show_docstring_raises}
10701085
## `show_docstring_raises`
10711086

10721087
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -1118,6 +1133,7 @@ def raise_runtime_error():
11181133
////
11191134
///
11201135

1136+
[](){#option-show_docstring_receives}
11211137
## `show_docstring_receives`
11221138

11231139
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -1177,6 +1193,7 @@ def iter_skip(
11771193
////
11781194
///
11791195

1196+
[](){#option-show_docstring_returns}
11801197
## `show_docstring_returns`
11811198

11821199
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -1228,6 +1245,7 @@ def rand() -> int:
12281245
////
12291246
///
12301247

1248+
[](){#option-show_docstring_warns}
12311249
## `show_docstring_warns`
12321250

12331251
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -1279,6 +1297,7 @@ def warn():
12791297
////
12801298
///
12811299

1300+
[](){#option-show_docstring_yields}
12821301
## `show_docstring_yields`
12831302

12841303
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**

docs/usage/configuration/general.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# General options
22

3+
[](){#option-allow_inspection}
34
## `allow_inspection`
45

56
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -281,6 +282,8 @@ __all__ = ["their_object"]
281282
<p>Docstring of your module.</p>
282283
////
283284
///
285+
286+
[](){#option-show_bases}
284287
## `show_bases`
285288

286289
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -318,6 +321,7 @@ plugins:
318321
////
319322
///
320323

324+
[](){#option-show_inheritance_diagram}
321325
## `show_inheritance_diagram`
322326

323327
[:octicons-heart-fill-24:{ .pulse } Sponsors only](../../insiders/index.md){ .insiders } &mdash;
@@ -403,6 +407,7 @@ Mixin2A --> Mixin2B
403407
because these classes do not exist in our documentation.*
404408
///
405409

410+
[](){#option-show_source}
406411
## `show_source`
407412

408413
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**

docs/usage/configuration/headings.md

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Headings options
22

3+
[](){#option-heading}
4+
## `heading`
5+
6+
- **:octicons-package-24: Type [`str`][] :material-equal: `""`{ title="default value" }**
7+
<!-- - **:octicons-project-template-24: Template :material-null:** (N/A) -->
8+
9+
A custom string to use as the heading of the root object (i.e. the object specified directly after the identifier `:::`). This will override the default heading generated by the plugin. See also the [`toc_label` option.][]
10+
11+
WARNING: **Not advised to be used as a global configuration option.** This option is not advised to be used as a global configuration option, as it will override the default heading for all objects. It is recommended to use it only in specific cases where you want to override the heading for a specific object.
12+
13+
```md title="in docs/some_page.md (local configuration)"
14+
::: path.to.module
15+
options:
16+
heading: "My fancy module"
17+
```
18+
19+
[](){#option-heading_level}
320
## `heading_level`
421

522
- **:octicons-package-24: Type [`int`][] :material-equal: `2`{ title="default value" }**
@@ -57,39 +74,7 @@ plugins:
5774
////
5875
///
5976
60-
## `heading`
61-
62-
- **:octicons-package-24: Type [`str`][] :material-equal: `""`{ title="default value" }**
63-
<!-- - **:octicons-project-template-24: Template :material-null:** (N/A) -->
64-
65-
A custom string to use as the heading of the root object (i.e. the object specified directly after the identifier `:::`). This will override the default heading generated by the plugin.
66-
67-
WARNING: **Not advised to be used as a global configuration option.** This option is not advised to be used as a global configuration option, as it will override the default heading for all objects. It is recommended to use it only in specific cases where you want to override the heading for a specific object.
68-
69-
```md title="in docs/some_page.md (local configuration)"
70-
::: path.to.module
71-
options:
72-
heading: "My fancy module"
73-
```
74-
75-
## `toc_label`
76-
77-
- **:octicons-package-24: Type [`str`][] :material-equal: `""`{ title="default value" }**
78-
<!-- - **:octicons-project-template-24: Template :material-null:** (N/A) -->
79-
80-
A custom string to use as the label in the Table of Contents for the root object (i.e. the one specified directly after the identifier `:::`). This will override the default label generated by the plugin.
81-
82-
WARNING: **Not advised to be used as a global configuration option.** This option is not advised to be used as a global configuration option, as it will override the default label for all objects. It is recommended to use it only in specific cases where you want to override the label for a specific object.
83-
84-
NOTE: **Use with/without `heading`.** If you use this option without specifying a custom `heading`, the default heading will be used in the page, but the label in the Table of Contents will be the one you specified. By providing both an option for `heading` and `toc_label`, we leave the customization entirely up to you.
85-
86-
```md title="in docs/some_page.md (local configuration)"
87-
::: path.to.module
88-
options:
89-
heading: "My fancy module"
90-
toc_label: "My fancy module"
91-
```
92-
77+
[](){#option-parameter_headings}
9378
## `parameter_headings`
9479

9580
[:octicons-tag-24: Insiders 1.6.0](../../insiders/changelog.md#1.6.0)
@@ -212,6 +197,7 @@ To customize symbols, see [Customizing symbol types](../customization.md/#symbol
212197

213198
///
214199

200+
[](){#option-show_root_heading}
215201
## `show_root_heading`
216202

217203
- **:octicons-package-24: Type [`bool`][] :material-equal: `False`{ title="default value" }**
@@ -275,6 +261,7 @@ plugins:
275261
////
276262
///
277263

264+
[](){#option-show_root_toc_entry}
278265
## `show_root_toc_entry`
279266

280267
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -332,6 +319,7 @@ More text.
332319
////
333320
///
334321

322+
[](){#option-show_root_full_path}
335323
## `show_root_full_path`
336324

337325
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -377,6 +365,7 @@ plugins:
377365
////
378366
///
379367

368+
[](){#option-show_root_members_full_path}
380369
## `show_root_members_full_path`
381370

382371
- **:octicons-package-24: Type [`bool`][] :material-equal: `False`{ title="default value" }**
@@ -425,6 +414,7 @@ plugins:
425414
////
426415
///
427416

417+
[](){#option-show_object_full_path}
428418
## `show_object_full_path`
429419

430420
- **:octicons-package-24: Type [`bool`][] :material-equal: `False`{ title="default value" }**
@@ -478,6 +468,7 @@ plugins:
478468
////
479469
///
480470

471+
[](){#option-show_category_heading}
481472
## `show_category_heading`
482473

483474
- **:octicons-package-24: Type [`bool`][] :material-equal: `False`{ title="default value" }**
@@ -543,6 +534,7 @@ plugins:
543534
////
544535
///
545536

537+
[](){#option-show_symbol_type_heading}
546538
## `show_symbol_type_heading`
547539

548540
[:octicons-tag-24: Insiders 1.1.0](../../insiders/changelog.md#1.1.0)
@@ -607,6 +599,7 @@ plugins:
607599
////
608600
///
609601

602+
[](){#option-show_symbol_type_toc}
610603
## `show_symbol_type_toc`
611604

612605
[:octicons-tag-24: Insiders 1.1.0](../../insiders/changelog.md#1.1.0)
@@ -670,3 +663,22 @@ plugins:
670663
</ul>
671664
////
672665
///
666+
667+
[](){#option-toc_label}
668+
## `toc_label`
669+
670+
- **:octicons-package-24: Type [`str`][] :material-equal: `""`{ title="default value" }**
671+
<!-- - **:octicons-project-template-24: Template :material-null:** (N/A) -->
672+
673+
A custom string to use as the label in the Table of Contents for the root object (i.e. the one specified directly after the identifier `:::`). This will override the default label generated by the plugin. See also the [`heading` option.][]
674+
675+
WARNING: **Not advised to be used as a global configuration option.** This option is not advised to be used as a global configuration option, as it will override the default label for all objects. It is recommended to use it only in specific cases where you want to override the label for a specific object.
676+
677+
NOTE: **Use with/without `heading`.** If you use this option without specifying a custom `heading`, the default heading will be used in the page, but the label in the Table of Contents will be the one you specified. By providing both an option for `heading` and `toc_label`, we leave the customization entirely up to you.
678+
679+
```md title="in docs/some_page.md (local configuration)"
680+
::: path.to.module
681+
options:
682+
heading: "My fancy module"
683+
toc_label: "My fancy module"
684+
```

0 commit comments

Comments
 (0)