Fixed tests.
This commit is contained in:
@@ -61,9 +61,10 @@ def process_and_display_chat(args: argparse.Namespace,
|
||||
display_chat(chat, dump, args.only_source_code)
|
||||
return chat, full_question, tags
|
||||
|
||||
|
||||
def process_and_display_tags(args: argparse.Namespace,
|
||||
config: dict,
|
||||
dump: bool=False
|
||||
dump: bool = False
|
||||
) -> None:
|
||||
display_tags_frequency(get_tags(config, None), dump)
|
||||
|
||||
@@ -104,8 +105,12 @@ def create_parser() -> argparse.ArgumentParser:
|
||||
parser.add_argument('-s', '--source', nargs='*', help='Source add content of a file to the query')
|
||||
parser.add_argument('-S', '--only-source-code', help='Print only source code', action='store_true')
|
||||
parser.add_argument('-w', '--with-tags', help="Print chat history with tags.", action='store_true')
|
||||
parser.add_argument('-W', '--with-file', help="Print chat history with filename.", action='store_true')
|
||||
parser.add_argument('-a', '--match-all-tags', help="All given tags must match when selecting chat history entries.", action='store_true')
|
||||
parser.add_argument('-W', '--with-file',
|
||||
help="Print chat history with filename.",
|
||||
action='store_true')
|
||||
parser.add_argument('-a', '--match-all-tags',
|
||||
help="All given tags must match when selecting chat history entries.",
|
||||
action='store_true')
|
||||
tags_arg = parser.add_argument('-t', '--tags', nargs='*', help='List of tag names', metavar='TAGS')
|
||||
tags_arg.completer = tags_completer # type: ignore
|
||||
extags_arg = parser.add_argument('-e', '--extags', nargs='*', help='List of tag names to exclude', metavar='EXTAGS')
|
||||
|
||||
@@ -111,5 +111,6 @@ def get_tags(config: Dict[str, Any], prefix: Optional[str]) -> List[str]:
|
||||
result.append(tag)
|
||||
return result
|
||||
|
||||
|
||||
def get_tags_unique(config: Dict[str, Any], prefix: Optional[str]) -> List[str]:
|
||||
return list(set(get_tags(config, prefix)))
|
||||
|
||||
Reference in New Issue
Block a user