ruff/crates/ty_python_semantic
Claude d4358cda65
[ty] Fix rename/references to find all overloaded function definitions
This fixes an issue where renaming an overloaded function only renamed
a single definition instead of all overloads and the implementation.

The fix addresses two issues:

1. `navigation_targets_match` in references.rs now checks if any current
   target matches any of the target definitions (not just the first).
   This is important for overloaded functions where each overload is a
   separate definition but they all refer to the same logical symbol.

2. `get_definition_targets` for FunctionDef in goto.rs now uses a new
   `definitions_for_name_in_scope` function that returns all definitions
   with the same name in the same scope, not just the single function's
   definition.

The new `definitions_for_name_in_scope` function in ide_support.rs takes
a file and scope directly, bypassing the scope lookup from a node, which
allows proper handling of function name identifiers.

This also fixes property getter/setter/deleter renaming and submodule
import reference finding, which now correctly identify all related
definitions.
2025-12-08 17:20:44 +00:00
..
resources [ty] Avoid double-inference on non-tuple argument to `Annotated` (#21837) 2025-12-08 10:24:05 -05:00
src [ty] Fix rename/references to find all overloaded function definitions 2025-12-08 17:20:44 +00:00
tests [ty] Don't send publish diagnostics for clients supporting pull diagnostics (#21772) 2025-12-04 08:12:04 +01:00
Cargo.toml [ty] Add 'remove unused ignore comment' code action (#21582) 2025-11-25 08:08:21 -05:00
build.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
mdtest.py [ty] mdtests with external dependencies (#20904) 2025-12-08 11:44:20 +01:00
mdtest.py.lock Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00