Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[PEP 695] Fix nested generic classes#17776

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JukkaL merged 7 commits intomasterfromgenerics-nested-class
Sep 18, 2024
Merged

Conversation

@JukkaL
Copy link
Collaborator

There was confusion about the fullnames of type variables in nested generic classes. A type variable could be defined internally asm.OuterClass.T, but it was sometimes accessed asm.T. The root cause was that the semantic analyzer didn't initialize the attribute that refers to the enclosing class consistently.

Fixes#17596.Fixes#17630.

@github-actions
Copy link
Contributor

According tomypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@svalentinsvalentin left a comment

Choose a reason for hiding this comment

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

lgtm! Just wondering if we need to worry about triple nested classes or some other odd cases.

@JukkaL
Copy link
CollaboratorAuthor

Just wondering if we need to worry about triple nested classes or some other odd cases.

Multiply nested classes don't work with this PR, sincelookup_fully_qualified_or_none doesn't support them. I'm leaving it out since they are probably quite rare, but I'll create a follow-up issue.

@JukkaLJukkaL merged commitf68f76d intomasterSep 18, 2024
@JukkaLJukkaL deleted the generics-nested-class branchSeptember 18, 2024 11:22
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@svalentinsvalentinsvalentin approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[PEP 695] Unexpected var-annotated error [PEP 695] Nested generic class fails to typecheck

2 participants

@JukkaL@svalentin

[8]ページ先頭

©2009-2025 Movatter.jp