I am getting an error while running mypy 0710 version in my code. I have made a small code snippet that is having an issue but not sure why this error is appearing
a = None
version = 2
if version == 2:
a = 10
#print("asdfgh")
if float(a) == 10:
print("erty")
I am getting error when I run the code in mypy as
tests/test.py:8: error: Argument 1 to "float" has incompatible type "Optional[int]"; expected "Union[SupportsFloat, str, bytes, bytearray]"
Any help will be appreciated