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

Update typing rewrite with special cases #289

Merged
merged 1 commit into from Jul 19, 2022
Merged

Update typing rewrite with special cases #289

merged 1 commit into from Jul 19, 2022

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Jul 18, 2022

Ref: asottile/pyupgrade#683

The typing_extensions readme lists a couple of special cases of objects which are available in older Python versions but don't provide the full support of new features.

Version Symbols
3.10 get_origin, get_args
3.11 NamedTuple, TypedDict, final, overload

reorder_python_imports.py Outdated Show resolved Hide resolved
testing/generate-typing-rewrite-info Outdated Show resolved Hide resolved
Comment on lines 20 to 29
CUSTOM_TYPING_EXT_SYMBOLS = {
(3, 11): {'NamedTuple', 'TypedDict'},
}
Copy link
Owner

Choose a reason for hiding this comment

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

ah oh I mean I would keep the data here but just delete the 3.11 stuff from the output when copying it over (that way when 3.11 final comes out I can just rerun this)

* 3.10: get_origin, get_args
* 3.11: NamedTuple, TypedDict, final, overload
Copy link
Owner

@asottile asottile left a comment

Choose a reason for hiding this comment

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

@asottile asottile merged commit c6d5e6c into asottile:main Jul 19, 2022
@cdce8p cdce8p deleted the typing-rewrite-special-cases branch July 19, 2022 12:59
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.

None yet

2 participants