Skip to content

fix Quoted forward references incorrectly resolve to shadowing class members #4266#4272

Open
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4266
Open

fix Quoted forward references incorrectly resolve to shadowing class members #4266#4272
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4266

Conversation

@asukaminato0721

Copy link
Copy Markdown
Collaborator

Summary

Fixes #4266

Quoted forward references now skip class-body namespaces during lookup.

Unquoted annotations retain existing class-member lookup behavior.

Test Plan

add test, update conformance results.

@github-actions

Copy link
Copy Markdown

Diff from mypy_primer, showing the effect of this PR on open source code:

steam.py (https://github.com/Gobot1234/steam.py)
+ ERROR steam/protobufs/store.py:429:17-26: Could not find name `OptInInfo` [unknown-name]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quoted forward references incorrectly resolve to shadowing class members

2 participants