-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
astral-sh/ruff
#23012Labels
bugSomething isn't workingSomething isn't workingserverRelated to the LSP serverRelated to the LSP server
Milestone
Description
Summary
Thanks for building Ty! Super excited about the project.
I set up ty using the cursor / vs code extension for the language server.
One of the critical use cases for type hints etc for me is finding / renaming all references of variables and attributes reliably.
This does not seem to work when searching for references based on the method argument across different files, but works when searching based on the call site or within the same file.
example_rename.py
from .example_rename_2 import ExampleClass
if __name__ == "__main__":
instance = ExampleClass(old_name="test") # Find all references for old_name works here
result = instance.method("world")example_rename_2.py
class ExampleClass:
def __init__(self, old_name: str) -> None: # Find all references for old_name only finds usages within file
self.old_name = old_name
def method(self, old_name: str) -> str:
return f"Hello {old_name}"
Expected
I would expect the same result, no matter where I search for references from. This also breaks renaming, when triggered from the class attribute, and will not rename call sites.
Version
0.0.9
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingserverRelated to the LSP serverRelated to the LSP server