Skip to content

Commit fd94149

Browse files
committed
feat: update show_category_heading with options "mod", "class"
1 parent e07c882 commit fd94149

File tree

1 file changed

+7
-2
lines changed
  • src/mkdocstrings_handlers/python/_internal

1 file changed

+7
-2
lines changed

src/mkdocstrings_handlers/python/_internal/config.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,10 +691,15 @@ class PythonInputOptions:
691691
] = True
692692

693693
show_category_heading: Annotated[
694-
bool,
694+
Literal["mod", "class", True, False],
695695
_Field(
696696
group="headings",
697-
description="When grouped by categories, show a heading for each category.",
697+
description="""When grouped by categories, show a heading for the categories.
698+
699+
When true, shows all category headings.
700+
When false, shows no category headings.
701+
When "mod" or "class", shows only headings on the given object.
702+
""",
698703
),
699704
] = False
700705

0 commit comments

Comments
 (0)