Skip to content

Renaming: Dataclass fields #3348

@MichaReiser

Description

@MichaReiser

Summary

Renaming a dataclass field doesn't rename keyword arguments in the constructor call:

from dataclasses import dataclass

@dataclass
class User:
    name: str

user = User(name="Alice")
print(user.name)

Playground

ty correctly renames the use of name in print but it fails to rename the keyword argument in User(name=...)

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserverRelated to the LSP server

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions