Things I have tried but did not work:
parser.add_argument('--download',type=bool,default=False)parser.add_argument('--download',default=False,action='store_true')parser.add_argument('--download',action='store_true')
For case 1, Passing False also gets interpreted as True.
For case 2 and 3, I get the error
main.py: error: unrecognized arguments: False
Python version : 3.8
Why does argparse not work for boolean arguments?
boolat thetypefunction is mentioned in the docs: docs.python.org/3/library/argparse.html#type