From 20ad737bec2af9344a2b7d6b80112803a010f399 Mon Sep 17 00:00:00 2001 From: bswck Date: Wed, 2 Jul 2025 21:02:14 +0200 Subject: [PATCH 1/2] WIP: Add `inheritance_diagram_direction` option --- src/mkdocstrings_handlers/python/_internal/config.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mkdocstrings_handlers/python/_internal/config.py b/src/mkdocstrings_handlers/python/_internal/config.py index 210f8fe2..a3157ddb 100644 --- a/src/mkdocstrings_handlers/python/_internal/config.py +++ b/src/mkdocstrings_handlers/python/_internal/config.py @@ -488,6 +488,14 @@ class PythonInputOptions: ), ] = 2 + inheritance_diagram_direction: Annotated[ + Literal["TB", "TD", "BT", "RL", "LR"], + _Field( + group="docstrings", + description="Set the direction of the Mermaid chart presenting the inheritance diagram of a class.", + ), + ] + inherited_members: Annotated[ bool | list[str], _Field( From 895f95d005ab1102bcf502b524149e23cefca557 Mon Sep 17 00:00:00 2001 From: bswck Date: Wed, 2 Jul 2025 21:02:36 +0200 Subject: [PATCH 2/2] Remove action verb from the description --- src/mkdocstrings_handlers/python/_internal/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkdocstrings_handlers/python/_internal/config.py b/src/mkdocstrings_handlers/python/_internal/config.py index a3157ddb..7914e04c 100644 --- a/src/mkdocstrings_handlers/python/_internal/config.py +++ b/src/mkdocstrings_handlers/python/_internal/config.py @@ -492,7 +492,7 @@ class PythonInputOptions: Literal["TB", "TD", "BT", "RL", "LR"], _Field( group="docstrings", - description="Set the direction of the Mermaid chart presenting the inheritance diagram of a class.", + description="The direction of the Mermaid chart presenting the inheritance diagram of a class.", ), ]