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
The following sample code shows mypy generating an error when using python's built-in sum(). As far as I can tell, there should be no error here, as dividing an int and a float is valid behavior. This can also be seen by the fact that assigning to an intermediary variable suppresses the error.
from typing import List
X: List[float] = [1.]
B = sum(X)
print(1 / B) # no error
print(1 / sum(X)) # error: Argument 1 to "sum" has incompatible type "List[float]"; expected "Iterable[int]"
python 3.6.8, mypy version 0.740
The text was updated successfully, but these errors were encountered:
The following sample code shows
mypy
generating an error when using python's built-insum()
. As far as I can tell, there should be no error here, as dividing an int and a float is valid behavior. This can also be seen by the fact that assigning to an intermediary variable suppresses the error.python 3.6.8, mypy version 0.740
The text was updated successfully, but these errors were encountered: