generated from jCloud/repository-template
feat(cli): add Python generator force argument
This commit is contained in:
2 files changed
+20
-1
No files matched your search
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user