Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Replace underscores by dashes in subcommand names. #46

Merged
merged 1 commit into from
Aug 20, 2017
Merged

Replace underscores by dashes in subcommand names. #46

merged 1 commit into from
Aug 20, 2017

Conversation

anntzer
Copy link
Owner

@anntzer anntzer commented Aug 19, 2017

Note that if one of the subcommand functions has a name starting with an
underscore, an invalid parser will be generated, as the corresponding
subcommand will start with a dash and thus not be triggerable from the
command line. However, I consider that it should be up to argparse to
raise an exception in that case -- if it doesn't do that validation, we
shouldn't bother either.

xref #44.

@evanunderscore
Copy link
Collaborator

Thanks for implementing this. Can you add a note to features.rst describing the new behavior?

Note that if one of the subcommand functions has a name starting with an
underscore, an invalid parser will be generated, as the corresponding
subcommand will start with a dash and thus not be triggerable from the
command line.  However, I consider that it should be up to argparse to
raise an exception in that case -- if it doesn't do that validation, we
shouldn't bother either.
@anntzer
Copy link
Owner Author

anntzer commented Aug 19, 2017

done

@evanunderscore
Copy link
Collaborator

Thanks, merging.

@evanunderscore evanunderscore merged commit 3e875d2 into anntzer:master Aug 20, 2017
@anntzer anntzer deleted the dashes-for-subcommands branch August 20, 2017 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants