Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add smarter no inverting #16

Open
Lucretiel opened this issue Apr 21, 2017 · 0 comments
Open

Add smarter no inverting #16

Lucretiel opened this issue Apr 21, 2017 · 0 comments

Comments

@Lucretiel
Copy link
Owner

Sometimes, when a default behavior is for a boolean switch to be True, the user will type in this:

@autocommand(__name__)
def main(no_do_thing=False):
    pass

Instead of this:

@autocommand(__name__)
def main(do_thing=True):
    pass

This is because the user doesn't want --do_thing to mean do_thing=False. This issue proposes that, when add_nos is given, then boolean switches will retain the default, but that the no_ versions will ALWAYS make them false, and the presence of the standard flag will ALWAYS make them True.

This is, unfortunately, a breaking change.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant