@@ -623,7 +623,7 @@ class ClassWithoutDocstring:
623623- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
624624<!-- - **:octicons-project-template-24 : Template :material-null:** (N/A) -->
625625
626- Whether to render the "Attributes" sections of docstrings.
626+ Whether to render the "Attributes" section of docstrings.
627627
628628` ` ` yaml title="in mkdocs.yml (global configuration)"
629629plugins:
@@ -676,7 +676,7 @@ class Class:
676676- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
677677<!-- - **:octicons-project-template-24 : Template :material-null:** (N/A) -->
678678
679- Whether to render the "Functions" or "Methods" sections of docstrings.
679+ Whether to render the "Functions" or "Methods" section of docstrings.
680680
681681` ` ` yaml title="in mkdocs.yml (global configuration)"
682682plugins:
@@ -751,7 +751,7 @@ class Class:
751751- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
752752<!-- - **:octicons-project-template-24 : Template :material-null:** (N/A) -->
753753
754- Whether to render the "Classes" sections of docstrings.
754+ Whether to render the "Classes" section of docstrings.
755755
756756` ` ` yaml title="in mkdocs.yml (global configuration)"
757757plugins:
@@ -804,13 +804,71 @@ class Class:
804804////
805805///
806806
807+ [](){#option-show_docstring_type_aliases}
808+ # # `show_docstring_type_aliases`
809+
810+ - **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
811+
812+ Whether to render the "Type Aliases" section of docstrings.
813+
814+ ` ` ` yaml title="in mkdocs.yml (global configuration)"
815+ plugins:
816+ - mkdocstrings:
817+ handlers:
818+ python:
819+ options:
820+ show_docstring_type_aliases: true
821+ ` ` `
822+
823+ ` ` ` md title="or in docs/some_page.md (local configuration)"
824+ ::: path.to.module
825+ options:
826+ show_docstring_type_aliases: false
827+ ` ` `
828+
829+ ` ` ` python
830+ """Summary.
831+
832+ Type Aliases:
833+ TypeAlias: Some type alias.
834+ """
835+
836+
837+ type TypeAlias = int
838+ """Summary."""
839+ ` ` `
840+
841+ /// admonition | Preview
842+ type : preview
843+
844+ //// tab | With type_aliases
845+ <h2>module</h2>
846+ <p>Summary.</p>
847+ <p><b>Type Aliases:</b></p>
848+
849+ **Name** | **Description**
850+ ------------ | ----------------
851+ ` TypeAlias` | Some type alias.
852+
853+ <h3><code>TypeAlias</code></h3>
854+ <p>Summary.</p>
855+ ////
856+
857+ //// tab | Without classes
858+ <h2>module</h2>
859+ <p>Summary.</p>
860+ <h3><code>TypeAlias</code></h3>
861+ <p>Summary.</p>
862+ ////
863+ ///
864+
807865[](){#option-show_docstring_modules}
808866# # `show_docstring_modules`
809867
810868- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
811869<!-- - **:octicons-project-template-24 : Template :material-null:** (N/A) -->
812870
813- Whether to render the "Modules" sections of docstrings.
871+ Whether to render the "Modules" section of docstrings.
814872
815873` ` ` yaml title="in mkdocs.yml (global configuration)"
816874plugins:
@@ -1245,6 +1303,57 @@ def rand() -> int:
12451303////
12461304///
12471305
1306+ [](){#option-show_docstring_type_parameters}
1307+ # # `show_docstring_type_parameters`
1308+
1309+ - **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
1310+ <!-- - **:octicons-project-template-24 : Template :material-null:** (N/A) -->
1311+
1312+ Whether to render the "Type Parameters" section of docstrings.
1313+
1314+ ` ` ` yaml title="in mkdocs.yml (global configuration)"
1315+ plugins:
1316+ - mkdocstrings:
1317+ handlers:
1318+ python:
1319+ options:
1320+ show_docstring_type_parameters: true
1321+ ` ` `
1322+
1323+ ` ` ` md title="or in docs/some_page.md (local configuration)"
1324+ ::: path.to.module
1325+ options:
1326+ show_docstring_type_parameters: false
1327+ ` ` `
1328+
1329+ ` ` ` python
1330+ class AClass[X: (int, str) = str]:
1331+ """Represents something.
1332+
1333+ Type Parameters:
1334+ X: Something.
1335+ """
1336+ ` ` `
1337+
1338+ /// admonition | Preview
1339+ type : preview
1340+
1341+ //// tab | With parameters
1342+ <h2><code>AClass</code></h2>
1343+ <p>Represents something.</p>
1344+ <p><b>Type Parameters:</b></p>
1345+
1346+ **Name** | **Bound or Constraints** | **Description** | **Default**
1347+ ---------- | ------------------------ | --------------- | -----------
1348+ ` whatever` | `(int, str)` | Something. | `str`
1349+ ////
1350+
1351+ //// tab | Without parameters
1352+ <h2><code>AClass</code></h2>
1353+ <p>Represents something.</p>
1354+ ////
1355+ ///
1356+
12481357[](){#option-show_docstring_warns}
12491358# # `show_docstring_warns`
12501359
0 commit comments