Skip to content

fix Renaming Protocol renames __init__ method instead of class #4170#4202

Closed
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4170
Closed

fix Renaming Protocol renames __init__ method instead of class #4170#4202
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4170

Conversation

@asukaminato0721

Copy link
Copy Markdown
Collaborator

Summary

Fixes #4170

Rename now resolves constructor calls to the class symbol, while find-references still follows __init__/__new__ as intended.

prepareRename uses the same raw-symbol behavior.

Test Plan

add test

@github-actions

Copy link
Copy Markdown

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

@meta-codesync

meta-codesync Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@stroxler has imported this pull request. If you are a Meta employee, you can view this in D112881319.

@stroxler stroxler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, I'll try to get it merged soon

@yangdanny97 yangdanny97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot closed this in 028ab1d Jul 21, 2026
@meta-codesync meta-codesync Bot added the Merged label Jul 21, 2026
@meta-codesync

meta-codesync Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@stroxler merged this pull request in 028ab1d.

@asukaminato0721
asukaminato0721 deleted the 4170 branch July 21, 2026 16:11
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.

Renaming Protocol renames __init__ method instead of class

3 participants