[ty] Include setters and deleters when renaming properties#22999
Merged
charliermarsh merged 2 commits intomainfrom Feb 4, 2026
Merged
[ty] Include setters and deleters when renaming properties#22999charliermarsh merged 2 commits intomainfrom
charliermarsh merged 2 commits intomainfrom
Conversation
92b76a5 to
41dac34
Compare
carljm
approved these changes
Feb 3, 2026
crates/ty_ide/src/rename.rs
Outdated
| // The second `my_func` definition should be renamed. The decorator reference | ||
| // is also found since both definitions share the same name in the same scope. | ||
| // Note: Ideally the decorator reference wouldn't be included since it semantically | ||
| // refers to the first `my_func`, but distinguishing shadowed bindings is a separate issue. |
Contributor
There was a problem hiding this comment.
This is too bad, since in this case it actually breaks the code. Do we have an issue open to track correct handling of shadowed bindings?
If the logic is really "same name in same scope", then why don't we also rename the def my_func above, which defines the same name in the same scope?
(Sorry if I'm asking a bunch of questions that are sort of orthogonal to this PR and maybe you aren't the right person to answer 😆 )
Member
Author
There was a problem hiding this comment.
(I refined the comment a bit... I'll also look into the issue.)
41dac34 to
fbaa866
Compare
bxff
pushed a commit
to bxff/ruff
that referenced
this pull request
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes astral-sh/ty#1781.