Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
According tomypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
svalentin left a comment
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.
lgtm! Just wondering if we need to worry about triple nested classes or some other odd cases.
JukkaL commentedSep 18, 2024
Multiply nested classes don't work with this PR, since |
There was confusion about the fullnames of type variables in nested generic classes. A type variable could be defined internally as
m.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.