From 6398a80a5668667c4b8e16e86277064a9e71d237 Mon Sep 17 00:00:00 2001 From: trickerer01 Date: Sat, 5 Oct 2024 20:56:06 +0700 Subject: [PATCH] Simplify usage string --- src/cmdargs.py | 10 ++++++++++ src/scenario.py | 2 +- src/version.py | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/cmdargs.py b/src/cmdargs.py index 70b165f..c730d2c 100644 --- a/src/cmdargs.py +++ b/src/cmdargs.py @@ -173,6 +173,11 @@ def add_common_args(parser_or_group: ArgumentParser) -> None: def prepare_arglist_ids(args: Sequence[str]) -> Namespace: parser, par_file, par_cmd = create_parsers() + par_cmd.usage = ( + '\n ids.py -start #number -end #number [options...] [extra tags...]' + '\n ids.py -start #number -count #number [options...] [extra tags...]' + '\n ids.py --use-id-sequence [options...] [extra tags...]' + ) par_file.add_argument('-path', metavar='#filepath', required=True, help=HELP_ARG_CMDFILE, type=valid_filepath_abs) arggr_start_or_seq = par_cmd.add_mutually_exclusive_group(required=True) @@ -190,6 +195,11 @@ def prepare_arglist_ids(args: Sequence[str]) -> Namespace: def prepare_arglist_pages(args: Sequence[str]) -> Namespace: parser, par_file, par_cmd = create_parsers() + par_cmd.usage = ( + '\n pages.py -start #number -end #number [options...] [extra tags...]' + '\n pages.py -start #number -pages #number [options...] [extra tags...]' + '\n pages.py -get_maxid [options...] [extra tags...]' + ) par_file.add_argument('-path', metavar='#filepath', required=True, help=HELP_ARG_CMDFILE, type=valid_filepath_abs) par_cmd.add_argument('-start', metavar='#number', default=1, help=HELP_ARG_PAGE_START, type=positive_nonzero_int) diff --git a/src/scenario.py b/src/scenario.py index c682cd5..1439931 100644 --- a/src/scenario.py +++ b/src/scenario.py @@ -35,7 +35,7 @@ def __init__(self, subfolder: str, extra_tags: list[str], quality: Quality, dura self.minrating: int = minrating or 0 self.minscore: int | None = minscore self.untagged_policy: str = utp or '' - self.id_sequence: list[int] = id_sequence or [] + self.id_sequence: list[int] = id_sequence or list() @property def utp(self) -> str: diff --git a/src/version.py b/src/version.py index c447882..c601041 100644 --- a/src/version.py +++ b/src/version.py @@ -9,7 +9,7 @@ APP_NAME = 'NM' APP_VER_MAJOR = '1' APP_VER_SUB = '8' -APP_REVISION = '458' +APP_REVISION = '459' APP_VERSION = f'{APP_VER_MAJOR}.{APP_VER_SUB}.{APP_REVISION}' #