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
View File
@@ -82,6 +82,15 @@ def create_argument_parser() -> argparse.ArgumentParser:
default='docs/reference',
help='the output directory the documentation will be written to',
)
common_parser.add_argument(
'-f',
'--force',
action='store_true',
help=(
'generate documentation even if the output directory is not '
'empty. Warning: data can be lost when setting this flag.'
),
)
argument_parser = argparse.ArgumentParser()
@@ -151,6 +160,7 @@ def main(argv=None) -> int:
exclude_sections=args.sections_exclude,
allow_html=args.allow_html,
allow_tables=args.allow_tables,
force=args.force,
)
except FileNotFoundError as exc:
return error(f'{exc.filename}: no such file or directory')