I have the following
p = ThrowingArgumentParser()
p.add_argument('action', type=str, choices=actions)
p.add_argument('args', nargs='*')
This is part of a multi level application. In level one, the command I care about is of the format command other-things-that-will-be-parsed-by-the-sub-module (for example get user john). So I'd except to get action = "get" and args = ["user", "john"].
So far so good. However, if I include a flag, all hell breaks loose (get user john --detailed). This will return a None. But I want to get the same as before: action = "get" and args = ["user", "john", "--detailed"].
Why is this failing?