-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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-40663: Correctly generate annotations for subscripts #20156
Conversation
@@ -275,6 +275,9 @@ def test_annotations(self): | |||
eq("dict[str, int]") | |||
eq("set[str,]") | |||
eq("tuple[str, ...]") | |||
eq("tuple[(str, *types)]") | |||
eq("tuple[str, int, (str, int)]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case was passing before. Did you meant tuple[str, int, *(str, int)]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is for validating tuples have parens when they are inside of another tuple with different precedence.
Thanks @isidentical for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
Sorry, @isidentical and @pablogsal, I could not cleanly backport this to |
Sorry @isidentical and @pablogsal, I had trouble checking out the |
I'll create backport PRs myself |
…unparse.c (pythonGH-20156). (cherry picked from commit 2135e10) Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
GH-20191 is a backport of this pull request to the 3.8 branch. |
…unparse.c (pythonGH-20156). (cherry picked from commit 2135e10) Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
GH-20192 is a backport of this pull request to the 3.7 branch. |
Thanks @isidentical for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
…e.c (pythonGH-20156) (cherry picked from commit 2135e10) Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
GH-20324 is a backport of this pull request to the 3.9 branch. |
https://bugs.python.org/issue40663