Open Radagaisus opened 4 years ago
This is a bit tricky, since the library requires the type
mechanism in order to hook into argparse. I guess I'll have to patch my own version of it somehow.
@TMiguelT Wouldn’t it be easier to just skip flags with this action? False is used by default if they’re not added, True if the flag is present — no real need for a prompt.
That's missing the point of this lib, though. That's just default argparse
behaviour. If you want that, you can just use prompt=False
, but eventually I'm going to have to work out how to deal with this properly.
Hi guys! What is the status of this problem now?
Using
parser.add_argument('--spectate', default=False, action='store_true')
crashes with the following error:Problem is here. Passing a
type
when it’s not needed will cause Argparse to throw the error.