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

bpo-40663: Correctly generate annotations for subscripts #20156

Merged
merged 1 commit into from May 18, 2020

Conversation

isidentical
Copy link
Sponsor Member

@isidentical isidentical commented May 17, 2020

@@ -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)]")
Copy link
Member

@pablogsal pablogsal May 18, 2020

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)]?

Copy link
Sponsor Member Author

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.

@pablogsal pablogsal merged commit 2135e10 into python:master May 18, 2020
@miss-islington
Copy link
Contributor

Thanks @isidentical for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington
Copy link
Contributor

Sorry, @isidentical and @pablogsal, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 2135e10dc717c00d10d899d232bebfc59bb25032 3.8

@miss-islington
Copy link
Contributor

Sorry @isidentical and @pablogsal, I had trouble checking out the 3.7 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 2135e10dc717c00d10d899d232bebfc59bb25032 3.7

@isidentical
Copy link
Sponsor Member Author

I'll create backport PRs myself

isidentical added a commit to isidentical/cpython that referenced this pull request May 18, 2020
…unparse.c (pythonGH-20156).

(cherry picked from commit 2135e10)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.8 only security fixes label May 18, 2020
@bedevere-bot
Copy link

GH-20191 is a backport of this pull request to the 3.8 branch.

isidentical added a commit to isidentical/cpython that referenced this pull request May 18, 2020
…unparse.c (pythonGH-20156).

(cherry picked from commit 2135e10)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
@bedevere-bot
Copy link

GH-20192 is a backport of this pull request to the 3.7 branch.

@pablogsal pablogsal added the needs backport to 3.9 only security fixes label May 22, 2020
@miss-islington
Copy link
Contributor

Thanks @isidentical for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 22, 2020
…e.c (pythonGH-20156)

(cherry picked from commit 2135e10)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label May 22, 2020
@bedevere-bot
Copy link

GH-20324 is a backport of this pull request to the 3.9 branch.

pablogsal pushed a commit that referenced this pull request May 22, 2020
…unparse.c (GH-20156). (GH-20192)

(cherry picked from commit 2135e10)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
pablogsal pushed a commit that referenced this pull request May 22, 2020
…unparse.c (GH-20156). (GH-20191)

(cherry picked from commit 2135e10)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
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

5 participants