What it does#
Checks for mutable default values in dataclass attributes.
Why is this bad?#
Mutable default values share state across all instances of the dataclass. This can lead to bugs when the attributes are changed in one instance, as those changes will unexpectedly affect all other instances.
Instead of sharing mutable defaults, use the
If the default value is intended to be mutable, it should be annotated with