When creating a new inmutable object from a dataclass with the replace function, or setting an attribute in a mutable object no warning is given if a value with a wrong type is assigned.
Should type be checked at runtime then? Seems like a lot of code / checks that don't take advantage of dataclasses default constructors.
If there is any way to make the static analyzer take into account the type hints in this cases it would be ideal.
When creating a new inmutable object from a dataclass with the replace function, or setting an attribute in a mutable object no warning is given if a value with a wrong type is assigned.
Should type be checked at runtime then? Seems like a lot of code / checks that don't take advantage of dataclasses default constructors.
If there is any way to make the static analyzer take into account the type hints in this cases it would be ideal.