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

Make metavar in argparse be Optional. #2739

Merged
merged 1 commit into from Jan 13, 2019

Conversation

Projects
None yet
2 participants
@cormoran
Copy link
Contributor

commented Jan 13, 2019

The default value of metavar in argparse.Action is None, therefore argparse.Action.metavar and the metavar argument of argparse.ArgumentParser.add_argument should be Optional.

https://github.com/python/cpython/blob/master/Lib/argparse.py#L809
https://github.com/python/cpython/blob/2.7/Lib/argparse.py#L779

@srittau
Copy link
Collaborator

left a comment

Thank you!

@srittau srittau merged commit 632eadc into python:master Jan 13, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this pull request Jan 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.