You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/sample_klein_app/application/math.py: note: In member "add" of class "Application":
src/sample_klein_app/application/math.py:54: error: Unsupported operand types for + ("Union[int, float]" and "int")
src/sample_klein_app/application/math.py: note: In member "subtract" of class "Application":
src/sample_klein_app/application/math.py:70: error: Unsupported operand types for - ("Union[int, float]" and "int")
src/sample_klein_app/application/math.py: note: In member "multiply" of class "Application":
src/sample_klein_app/application/math.py:85: error: Unsupported operand types for * ("Union[int, float]" and "int")
src/sample_klein_app/application/math.py: note: In member "divide" of class "Application":
src/sample_klein_app/application/math.py:101: error: Unsupported operand types for / ("Union[int, float]" and "int")
The text was updated successfully, but these errors were encountered:
And mypy thinks that the arithmetic operators don't like Union[int, float] and int, even though it's totally OK to operate on float and int combinations:
>>>1.0+12.0
A confusing aspect for me is that int is part of the complaint at all; this is actually a Union[int, float]s being added to another Union[int, float], not an int.
mypy
is complaining aboutmath.py
thusly:The text was updated successfully, but these errors were encountered: