argh icon indicating copy to clipboard operation
argh copied to clipboard

argh.dispatching.dispatch( skip_unknown_args=True ) bug

Open faymek opened this issue 3 years ago • 0 comments

https://github.com/neithere/argh/blob/dcd3253f2994400a6a58a700c118c53765bc50a4/argh/dispatching.py#L152

Python 3.8 parser.parse_known_args return a tuple of (Namespace, list), while parser.parse_args return a Namespace. Below is my modification:

if skip_unknown_args:
    namespace_obj, _ = parser.parse_known_args(argv, namespace=namespace)
else:
    namespace_obj = parser.parse_args(argv, namespace=namespace)

faymek avatar Nov 02 '21 08:11 faymek