Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added _ExtendAction to argparse #8701

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

Merged
merged 2 commits into from
Sep 7, 2022
Merged

Added _ExtendAction to argparse #8701

merged 2 commits into from
Sep 7, 2022

Conversation

jspaezp
Copy link
Contributor

@jspaezp jspaezp commented Sep 7, 2022

_ExtendAction was added to argparse since python 3.8. I am adding it here, since it is missing

Reference of the addition to the standard library: python/cpython@aa32a7e

_ExtendAction was added to argparse since python 3.8.
I am adding it here, since it is missing

Reference of the addition to the standard library:
python/cpython@aa32a7e
@github-actions

This comment has been minimized.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! We need to use a sys.version_info guard, though, since it's not available on 3.7:

Co-authored-by: Alex Waygood <[email protected]>
@jspaezp
Copy link
Contributor Author

jspaezp commented Sep 7, 2022

Thanks for the quick review!
Accepted the change!
Thanks, since it is my first contribution here I did not know we had to support py3.7

@jspaezp jspaezp requested a review from AlexWaygood September 7, 2022 20:44
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2022

Diff from mypy_primer, showing the effect of this PR on open source code:

pylint (https://github.com/pycqa/pylint)
+ pylint/config/argument.py:370: error: Incompatible types in assignment (expression has type "Type[pylint.config.callback_actions._ExtendAction]", variable has type "Type[argparse._ExtendAction]")  [assignment]
+ pylint/config/argument.py:368: error: Unused "type: ignore" comment

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! And welcome to typeshed!

@AlexWaygood AlexWaygood merged commit cc7d256 into python:master Sep 7, 2022
@jspaezp jspaezp deleted the patch-1 branch September 7, 2022 20:56
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

Successfully merging this pull request may close these issues.

2 participants