You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the behaviour is for foo=True to create a --foo arg with store_false, ie. so that --foo means foo=False. This is very counterintuitive.
neithere#73 has some thoughts on this, and I've implemented a similar thing in my own usage previously as an explicit custom Action that adds --foo and --no-foo args.
Open questions:
Do we want both --foo and --no-foo, or do we just want --no-foo if the default is foo=True
There should still be a way to opt into both --foo and --no-foo, especially if the default is dynamic based on other conditions - the one that comes up a lot personally is something like --color--no-color with default being sys.stdout.isatty().
How do we reconcile this with existing behaviour without breaking backwards compatability too badly?
Does it make sense to combine this with short args? eg. -f=true/false or -f=yes/no (probably not - if the user wants this they can explicitly use choices=["yes","no"])
The text was updated successfully, but these errors were encountered:
Right now the behaviour is for
foo=True
to create a--foo
arg withstore_false
, ie. so that--foo
meansfoo=False
. This is very counterintuitive.neithere#73 has some thoughts on this, and I've implemented a similar thing in my own usage previously as an explicit custom Action that adds
--foo
and--no-foo
args.Open questions:
--foo
and--no-foo
, or do we just want--no-foo
if the default is foo=True--foo
and--no-foo
, especially if the default is dynamic based on other conditions - the one that comes up a lot personally is something like--color
--no-color
with default beingsys.stdout.isatty()
.-f=true/false
or-f=yes/no
(probably not - if the user wants this they can explicitly usechoices=["yes","no"]
)The text was updated successfully, but these errors were encountered: