-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
bpo-37150: Throw ValueError if FileType class object was passed in add_argument #13805
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Our records indicate we have not received your CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
Thanks @zygocephalus for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
GH-13901 is a backport of this pull request to the 3.8 branch. |
…d_argument (GH-13805) There is a possibility that someone (like me) accidentally will omit parentheses with `FileType` arguments after `FileType`, and parser will contain wrong file until someone will try to use it. Example: ```python parser = argparse.ArgumentParser() parser.add_argument('-x', type=argparse.FileType) ``` https://bugs.python.org/issue37150 (cherry picked from commit 03d5831) Co-authored-by: zygocephalus <grrrr@protonmail.com>
…d_argument (pythonGH-13805) There is a possibility that someone (like me) accidentally will omit parentheses with `FileType` arguments after `FileType`, and parser will contain wrong file until someone will try to use it. Example: ```python parser = argparse.ArgumentParser() parser.add_argument('-x', type=argparse.FileType) ``` https://bugs.python.org/issue37150
There is a possibility that someone (like me) can accidentally omit parentheses with
FileType
arguments afterFileType
, and the parser will contain wrong file until someone will try to use it.Example:
https://bugs.python.org/issue37150