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

Fix feature detection for parenthesized context managers #4104

Merged
merged 2 commits into from Dec 12, 2023

Conversation

JelleZijlstra
Copy link
Collaborator

This showed up in #4064.

self.check_features_used("a[x, *y(), z] = t", {Feature.VARIADIC_GENERICS})
self.check_features_used("def fn(*args: *T): pass", {Feature.VARIADIC_GENERICS})

self.check_features_used("with a: pass", set())
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are the new tests. Several of them would have previously failed. The case that I ran into in one of our tests was

with (x := await a, y := await b):
        pass

@hauntsaninja hauntsaninja merged commit ebd543c into psf:main Dec 12, 2023
45 of 46 checks passed
@JelleZijlstra JelleZijlstra deleted the fixfeaturedetect branch December 12, 2023 05:39
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