From 99d10ee8d38204efb008cb7b88283412c3931aed Mon Sep 17 00:00:00 2001 From: Nikolay Lysenko Date: Sun, 25 Feb 2024 11:00:31 +0300 Subject: [PATCH] style: Rename CLI option and update its help --- readingbricks/__main__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readingbricks/__main__.py b/readingbricks/__main__.py index bf5a56d..69f7813 100644 --- a/readingbricks/__main__.py +++ b/readingbricks/__main__.py @@ -22,11 +22,11 @@ def parse_cli_args() -> argparse.Namespace: parser = argparse.ArgumentParser(description='Flask app for reading and searching notes') parser.add_argument( '-c', '--config_path', type=str, default=None, - help='path to configuration file' + help="path to configuration file" ) parser.add_argument( - '-r', '--use_existing_resources', action=argparse.BooleanOptionalAction, - help='if this flag is passed, resources are not generated' + '-f', '--fast_launch', action=argparse.BooleanOptionalAction, + help="flag whether valid resources already exist and so there is no need to generate them" ) cli_args = parser.parse_args() return cli_args @@ -37,7 +37,7 @@ def main() -> None: cli_args = parse_cli_args() if cli_args.config_path is not None: app.config.from_file(cli_args.config_path, load=json.load) - if not cli_args.use_existing_resources: + if not cli_args.fast_launch: make_resources( app.config.get("NOTES_DIR"), app.config.get("RESOURCES_DIR"),