Skip to content

Fix dataclass defaults #250

@drdavella

Description

@drdavella

See this StackOverflow issue for a description of the problem: https://stackoverflow.com/questions/53632152/why-cant-dataclasses-have-mutable-defaults-in-their-class-attributes-declaratio

It would be useful to have a codemod that could fix this proactively. Even though it results in a runtime error, if it lives on a codepath that is not thoroughly tested, it might get missed.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestnew-codemodDescription for a new codemod

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions