-
Notifications
You must be signed in to change notification settings - Fork 256
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
Parser using parent parser shows help message for parent parser instead of own message #165
Comments
This has been fixed in version 2.3, I will try to update the version in meson's wrapdb. Sorry for the noise, and thanks for the project! |
The help message, however, is the wrong one (the parent's), as is the version number. Reopening with new title. |
This can be worked around by initializing the parent parser with Maybe documenting it is a good enough stopgap instead of changing how initialization as a whole works. I can make a PR for the README, in that case. |
Thank you for your report. Let me look into this and get back to you next week. |
Digging into the project history, I'm guessing the expected practice is to disable the parent parser default arguments. But that paragraph did not get copied into the README. You can see the Python Docs are the source of You could adapt the relevant Python paragraph (immediately under the code example) to include in |
Thank you for the suggestions! I will take a look and try to come up with a PR :) |
This replaces the verbiage copied from the Python argparse documentation and makes the code sample more concrete. This illustrates how to avoid the multiple help output problem reported in p-ranav#165. Closes p-ranav#165 Signed-off-by: Sean Robinson <[email protected]>
Hi!
I'm using parent parsers with argparse, but it seems that, when used, the automatic
-h,--help
and-v,--version
options no longer exist in the "child" parser.Passing
-b <value>
works just fine, but not-h
or-v
, nor their long versions. If I use the parent parser though, everything works.I get the following error:
The text was updated successfully, but these errors were encountered: