From 799b91c2d5fb92fd0d17c1ffe15afe663a9b8655 Mon Sep 17 00:00:00 2001 From: raj_mathe Date: Sat, 23 Oct 2021 13:23:07 +0200 Subject: [PATCH] master > master: code - entrance zum Programm jetzt mit basictypen --- code/main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/main.py b/code/main.py index 2401c53..47f65b5 100644 --- a/code/main.py +++ b/code/main.py @@ -26,9 +26,9 @@ PATH_TO_CONFIG: str = 'code/config.yml'; # MAIN PROCESS # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -def enter(args: argparse.Namespace): - SetQuietMode(args.quiet); - SetDebugMode(args.debug); +def enter(quiet: bool, debug: bool, path: Union[str, Any], **_): + SetQuietMode(quiet); + SetDebugMode(debug); configpath = PATH_TO_CONFIG if args.path is None else args.path; if args.all is not None: LoopThroughCases(path=configpath); @@ -114,4 +114,5 @@ if __name__ == '__main__': parser.add_argument('config', nargs='?', help='Führt alle Testfälle in der config.yml Datei durch.'); parser.add_argument('--debug', action='store_true', help='Debugging Messages stummschalten.') parser.add_argument('-q', '--quiet', action='store_true', help='Alle console-messages bis auf Errors stummschalten.') - enter(parser.parse_args(cli_args)); + args = parser.parse_args(cli_args); + enter(quiet=args.quiet, debug=args.debug, path=args.path);