Skip to content

argparse.ArgumentParser.add_argument's help argument not optional. #1969

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

Closed
chrisgavin opened this issue Mar 19, 2018 · 2 comments
Closed

argparse.ArgumentParser.add_argument's help argument not optional. #1969

chrisgavin opened this issue Mar 19, 2018 · 2 comments

Comments

@chrisgavin
Copy link
Contributor

I have a wrapper method around argparse.ArgumentParser.add_argument that has None as a default parameter value that gets passed to help of add_argument. It seems to work, but gets flagged as a type error.

Am I misunderstanding the types system, or should argparse.ArgumentParser.add_argument's help argument be Optional? I'm happy to make a PR with this change but I wanted to check I'm not doing something stupid first.

@JelleZijlstra
Copy link
Member

Looks like you're right, it should be Optional. Feel free to send a PR!

@chrisgavin
Copy link
Contributor Author

Thanks very much. I've opened a PR. 😄

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

No branches or pull requests

2 participants