Renaming dataclass property renames class name instead
Open
help wanted
language-server
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 519
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
When renaming a property of a dataclass (or Pydantic Schema / ...) pyrefly renames the class name instead:
```python
@dataclass
class Foo:
a: int
b: str
Foo(
a=123,
b='abc', # <- press F2 or "Rename Symbol" here, enter 'c'
)
```
After renaming:
```python
@dataclass
class c:
a: int
b: str
c(
a=123,
b='abc',
)
```
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
VSCode with pyrefly v0.53.0
Contributor guide
Assessment
This issue has not been assessed yet.