@@ -449,6 +449,195 @@ class Class:
449
449
////
450
450
///
451
451
452
+ # # `show_docstring_functions`
453
+
454
+ - **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
455
+ <!-- - **:octicons-project-template-24 : Template :material-null:** (N/A) -->
456
+
457
+ Whether to render the "Functions" or "Methods" sections of docstrings.
458
+
459
+ ` ` ` yaml title="in mkdocs.yml (global configuration)"
460
+ plugins:
461
+ - mkdocstrings:
462
+ handlers:
463
+ python:
464
+ options:
465
+ show_docstring_functions: true
466
+ ` ` `
467
+
468
+ ` ` ` md title="or in docs/some_page.md (local configuration)"
469
+ ::: path.to.module
470
+ options:
471
+ show_docstring_functions: false
472
+ ` ` `
473
+
474
+ ` ` ` python
475
+ """Summary.
476
+
477
+ Functions:
478
+ foo: Some function.
479
+ """
480
+
481
+
482
+ def foo():
483
+ ...
484
+
485
+
486
+ class Class:
487
+ """Summary.
488
+
489
+ Methods:
490
+ bar: Some method.
491
+ """
492
+
493
+ def bar(self):
494
+ ...
495
+ ` ` `
496
+
497
+ /// admonition | Preview
498
+ type : preview
499
+
500
+ //// tab | With functions
501
+ <h2>module</h2>
502
+ <p>Summary.</p>
503
+ <p><b>Functions:</b></p>
504
+
505
+ **Name** | **Description**
506
+ -------- | ---------------
507
+ ` foo` | Some function.
508
+
509
+ <h3><code>Class</code></h3>
510
+ <p>Summary.</p>
511
+ <p><b>Methods:</b></p>
512
+
513
+ **Name** | **Description**
514
+ -------- | ---------------
515
+ ` bar` | Some method.
516
+ ////
517
+
518
+ //// tab | Without functions
519
+ <h2>module</h2>
520
+ <p>Summary.</p>
521
+ <h3><code>Class</code></h3>
522
+ <p>Summary.</p>
523
+ ////
524
+ ///
525
+
526
+
527
+ # # `show_docstring_classes`
528
+
529
+ - **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
530
+ <!-- - **:octicons-project-template-24 : Template :material-null:** (N/A) -->
531
+
532
+ Whether to render the "Classes" sections of docstrings.
533
+
534
+ ` ` ` yaml title="in mkdocs.yml (global configuration)"
535
+ plugins:
536
+ - mkdocstrings:
537
+ handlers:
538
+ python:
539
+ options:
540
+ show_docstring_classes: true
541
+ ` ` `
542
+
543
+ ` ` ` md title="or in docs/some_page.md (local configuration)"
544
+ ::: path.to.module
545
+ options:
546
+ show_docstring_classes: false
547
+ ` ` `
548
+
549
+ ` ` ` python
550
+ """Summary.
551
+
552
+ Classes:
553
+ Class: Some class.
554
+ """
555
+
556
+
557
+ class Class:
558
+ """Summary."""
559
+ ` ` `
560
+
561
+ /// admonition | Preview
562
+ type : preview
563
+
564
+ //// tab | With classes
565
+ <h2>module</h2>
566
+ <p>Summary.</p>
567
+ <p><b>Classes:</b></p>
568
+
569
+ **Name** | **Description**
570
+ -------- | ---------------
571
+ ` Class` | Some class.
572
+
573
+ <h3><code>Class</code></h3>
574
+ <p>Summary.</p>
575
+ ////
576
+
577
+ //// tab | Without classes
578
+ <h2>module</h2>
579
+ <p>Summary.</p>
580
+ <h3><code>Class</code></h3>
581
+ <p>Summary.</p>
582
+ ////
583
+ ///
584
+
585
+ # # `show_docstring_modules`
586
+
587
+ - **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
588
+ <!-- - **:octicons-project-template-24 : Template :material-null:** (N/A) -->
589
+
590
+ Whether to render the "Modules" sections of docstrings.
591
+
592
+ ` ` ` yaml title="in mkdocs.yml (global configuration)"
593
+ plugins:
594
+ - mkdocstrings:
595
+ handlers:
596
+ python:
597
+ options:
598
+ show_docstring_modules: true
599
+ ` ` `
600
+
601
+ ` ` ` md title="or in docs/some_page.md (local configuration)"
602
+ ::: path.to.module
603
+ options:
604
+ show_docstring_modules: false
605
+ ` ` `
606
+
607
+ ` ` ` tree
608
+ module/
609
+ __init__.py
610
+ submodule.py
611
+ ` ` `
612
+
613
+ ` ` ` python title="module/__init__.py"
614
+ """Summary.
615
+
616
+ Modules:
617
+ submodule: Some module.
618
+ """
619
+ ` ` `
620
+
621
+ /// admonition | Preview
622
+ type : preview
623
+
624
+ //// tab | With modules
625
+ <h2>module</h2>
626
+ <p>Summary.</p>
627
+ <p><b>Modules:</b></p>
628
+
629
+ **Name** | **Description**
630
+ ----------- | ---------------
631
+ ` submodule` | Some module.
632
+
633
+ ////
634
+
635
+ //// tab | Without modules
636
+ <h2>module</h2>
637
+ <p>Summary.</p>
638
+ ////
639
+ ///
640
+
452
641
# # `show_docstring_description`
453
642
454
643
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
0 commit comments