feat(cli): add Python generator force argument

This commit is contained in:
jakob.scheid committed 2026-09-27 15:09:35 +02:00
1 parent d8508e0fa3
commit f0c271f8fd
2 files changed
+20 -1

No files matched your search

+10 -1
View File
@@ -78,6 +78,7 @@ def _generate(
),
allow_html: bool = False,
allow_tables: bool = False,
force: bool = False,
) -> None:
"""
Generates the documentation for a Python project.
@@ -94,6 +95,9 @@ def _generate(
:type allow_html: bool
:param allow_tables: Indicates whether Markdown tables are allowed.
Warning: Markdown tables are not CommonMark.
:param force: Indicates whether the output directory shall be
overwritten if it is not empty.
:type force: bool
"""
docs_generator = PythonDocumentationGenerator(
@@ -103,7 +107,7 @@ def _generate(
allow_html=allow_html,
allow_tables=allow_tables,
)
docs_generator.generate_documentation()
docs_generator.generate_documentation(force)
def generate(
@@ -114,6 +118,7 @@ def generate(
exclude_sections: list[str] = [],
allow_html: bool = False,
allow_tables: bool = False,
force: bool = False,
) -> None:
"""
Generates the documentation for a Python project.
@@ -133,6 +138,9 @@ def generate(
:type allow_html: bool
:param allow_tables: Indicates whether Markdown tables are allowed.
Warning: Markdown tables are not CommonMark.
:param force: Indicates whether the output directory shall be
overwritten if it is not empty.
:type force: bool
"""
sections = parse_sections_list(include_sections, exclude_sections)
@@ -143,4 +151,5 @@ def generate(
include_sections=sections,
allow_html=allow_html,
allow_tables=allow_tables,
force=force,
)