What it does#
Checks for function calls in dataclass attribute defaults.
Why is this bad?#
Function calls are only performed once, at definition time. The returned value is then reused by all instances of the dataclass. This can lead to unexpected behavior when the function call returns a mutable object, as changes to the object will be shared across all instances.
If a field needs to be initialized with a mutable object, use the