Closed nstrydom2 closed 3 years ago
Just FYI, changing this line this also means you lose the --no-verbose
options etc.
- parser.add_argument('-V', '--verbose', default=True, action=argparse.BooleanOptionalAction, help="increase output verbosity")
+ parser.add_argument('-V', '--verbose', default=True, action='store_true', help="increase output verbosity")
What might have happened to you (and I'm sorry I didn't notice this earlier) is that this feature is only available in version 3.9 or higher, see also the docs for more information.
Just FYI, changing this line this also means you lose the
--no-verbose
options etc.- parser.add_argument('-V', '--verbose', default=True, action=argparse.BooleanOptionalAction, help="increase output verbosity") + parser.add_argument('-V', '--verbose', default=True, action='store_true', help="increase output verbosity")
What might have happened to you (and I'm sorry I didn't notice this earlier) is that this feature is only available in version 3.9 or higher, see also the docs for more information.
Right. Which is why I removed it. I had come to the same conclusion.
That's fine. Did you test if the user can still turn off these features?
That's fine. Did you test if the user can still turn off these features?
Good catch 💯
I suspect you might have to change the defaults to False
, so the user has to enable them manually all over again with --verbose
, --logging
, and so on. Hence why I looked into an alternative solution.
What would you do?
Roll out your own implementation for this flag :D
This could also work:
--no-verbose
flag that defaults to False
(in addition to --verbose
which defaults to True
(args.verbose ^ args.no_verbose)
(XOR) to the progressbar
parameterRinse and repeat for all the other options.
Edit: Changed it a few times, but I tested it quickly in the terminal:
verbose=True
noverbose=False
# True
print(verbose ^ nonverbose)
noverbose=True
# False
print(verbose ^ nonverbose)
The logic seems to check out this time :)
Closes #62