From 0f55dccc9ba230d37d8ff3e606ee7854079d2941 Mon Sep 17 00:00:00 2001 From: Patrick Elmer Date: Sun, 20 Aug 2023 08:54:33 +0900 Subject: [PATCH] Show help message if args of the input and necessary args is not equal --- magicli/magicli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/magicli/magicli.py b/magicli/magicli.py index 373a6b8..1d8569d 100644 --- a/magicli/magicli.py +++ b/magicli/magicli.py @@ -61,6 +61,10 @@ def magicli(exclude=['main'], glbls=None, argv=None): print(help_message(config)) exit() + if not len(args) == len(config['arguments']): + print(help_message(config)) + exit() + args, kwargs = cast_types(args, kwargs, config) try: