Skip to content

Local forward refs should precede global forward refs - #19000

Merged
JukkaL merged 1 commit into
python:masterfrom
ilevkivskyi:special-case-forward-globals
Apr 30, 2025
Merged

Local forward refs should precede global forward refs#19000
JukkaL merged 1 commit into
python:masterfrom
ilevkivskyi:special-case-forward-globals

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

Fixes #18988

This should be a minimal change to restore backwards compatibility for an edge case with forward references.

@github-actions

Copy link
Copy Markdown
Contributor

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

@JukkaL JukkaL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the fix!

@JukkaL
JukkaL merged commit 70ee798 into python:master Apr 30, 2025
jhance pushed a commit that referenced this pull request May 8, 2025
Fixes #18988

This should be a minimal change to restore backwards compatibility for
an edge case with forward references.
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.

Regression related to forward reference and nested classes

2 participants