Properties, setter
, and Incompatible types in assignment
#4167
Labels
setter
, and Incompatible types in assignment
#4167
Expected Behaviour
setter
withUnion[]
setter
Actual Behaviour & Repro Case
Python Code
Stdout
(i.e., valid Python code)
Mypy CLI
Result
Notes
Mypy
seems to be type checking the assignment using the type declared indef foo(self) -> int:
instead of the declared types in thesetter
:def foo(self, value: Union[int, float]) -> None:
Current Solution
# type: ignore
The text was updated successfully, but these errors were encountered: