From 22bebc16ed1300fb1226794e1d1e80b58d72c085 Mon Sep 17 00:00:00 2001 From: juk0de Date: Sat, 12 Aug 2023 14:14:06 +0200 Subject: [PATCH] fixed min nr of expected arguments --- chatmastermind/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chatmastermind/main.py b/chatmastermind/main.py index cc634fc..623b83a 100755 --- a/chatmastermind/main.py +++ b/chatmastermind/main.py @@ -147,13 +147,13 @@ def create_parser() -> argparse.ArgumentParser: # a parent parser for all commands that support tag selection tag_parser = argparse.ArgumentParser(add_help=False) - tag_arg = tag_parser.add_argument('-t', '--tags', nargs='*', + tag_arg = tag_parser.add_argument('-t', '--tags', nargs='+', help='List of tag names', metavar='TAGS') tag_arg.completer = tags_completer # type: ignore - extag_arg = tag_parser.add_argument('-e', '--extags', nargs='*', + extag_arg = tag_parser.add_argument('-e', '--extags', nargs='+', help='List of tag names to exclude', metavar='EXTAGS') extag_arg.completer = tags_completer # type: ignore - otag_arg = tag_parser.add_argument('-o', '--output-tags', nargs='*', + otag_arg = tag_parser.add_argument('-o', '--output-tags', nargs='+', help='List of output tag names, default is input', metavar='OTAGS') otag_arg.completer = tags_completer # type: ignore tag_parser.add_argument('-a', '--match-all-tags', @@ -172,7 +172,7 @@ def create_parser() -> argparse.ArgumentParser: ask_cmd_parser.add_argument('-M', '--model', help='Model to use') ask_cmd_parser.add_argument('-n', '--number', help='Number of answers to produce', type=int, default=1) - ask_cmd_parser.add_argument('-s', '--source', nargs='*', help='Source add content of a file to the query') + ask_cmd_parser.add_argument('-s', '--source', nargs='+', help='Source add content of a file to the query') ask_cmd_parser.add_argument('-S', '--only-source-code', help='Add pure source code to the chat history', action='store_true')