From 60a097f0cce33ebb8dc822841e5dafd0cd0e7c23 Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Thu, 10 Sep 2026 09:58:18 +0200 Subject: [PATCH] feat(cli): allow to pass command line arguments to function --- src/jcloud_docsgen/cli/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jcloud_docsgen/cli/cli.py b/src/jcloud_docsgen/cli/cli.py index 70864b6..d54fde5 100644 --- a/src/jcloud_docsgen/cli/cli.py +++ b/src/jcloud_docsgen/cli/cli.py @@ -35,7 +35,7 @@ def existing_directory(path: str) -> pathlib.Path: raise argparse.ArgumentTypeError(f'{_path}: not a directory') return path -def main() -> int: +def main(argv = None) -> int: common_parser = argparse.ArgumentParser(add_help = False) common_parser.add_argument( 'project_directory', @@ -88,7 +88,7 @@ def main() -> int: help = 'indicates whether Markdown tables are allowed in the documentation. By default, Markdown tables are disabled. Warning: Markdown tables are not CommonMark.' ) - args = argument_parser.parse_args() + args = argument_parser.parse_args(argv) if args.output_dir is None: args.output_dir = args.project_directory / 'docs/reference'