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

Mandatory options aren't very useful #194

Open
jamesderlin opened this issue May 4, 2021 · 0 comments
Open

Mandatory options aren't very useful #194

jamesderlin opened this issue May 4, 2021 · 0 comments
Labels
next-breaking-release An issue that fixing would require a breaking change, but doesn't justify on its own a breakage. type-enhancement A request for a change that isn't a bug

Comments

@jamesderlin
Copy link

jamesderlin commented May 4, 2021

This was raised by https://stackoverflow.com/q/67384823/.

Currently the presence of a mandatory option (added by #177) will cause ArgParser.parse to throw an exception whenever the option is omitted. I don't think that this is very useful in practice since it breaks --help.

#156 requested adding an equivalent of required options from Python's argparse module, but note that Python's argparse:

  • Has a special action='help' mechanism for specifying an option that should print help.
  • Adds a special handler for -h/--help by default.

In contrast, package:args's ArgParser currently is not opinionated about how help should be handled, and -h/--help is typically handled by an ordinary boolean flag.

@devoncarew devoncarew added type-enhancement A request for a change that isn't a bug next-breaking-release An issue that fixing would require a breaking change, but doesn't justify on its own a breakage. labels Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-breaking-release An issue that fixing would require a breaking change, but doesn't justify on its own a breakage. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants