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
ex.py:5: error: Incompatible types in assignment
(expression has type "List[Optional[int]]",
variable has type "List[int]")
I expected it to work, as it is an extension of the working
x: Optional[int] =1assertxisnotNoney: int=x# Works
except I have a list of possibly integer rather than one.
I can likely solve the issue by copying the list one item at a time and doing the check, but xs is a proper result already. I already had the assert all(...) in my original use-case.
mypy 0.670
python 3.7.7
The text was updated successfully, but these errors were encountered:
The trimmed down version of the issue is as follows:
gives error:
I expected it to work, as it is an extension of the working
except I have a list of possibly integer rather than one.
I can likely solve the issue by copying the list one item at a time and doing the check, but
xs
is a proper result already. I already had theassert all(...)
in my original use-case.mypy 0.670
python 3.7.7
The text was updated successfully, but these errors were encountered: