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
gvanrossum
changed the title
Wrong positive with list comprehensions and --warn-return-any
False positive with list comprehensions and --warn-return-any
Dec 12, 2017
Given the following code in
test.py
:Testing it with
mypy --warn-return-any test.py
(mypy 0.550, Python 3.6.3) gives the following error:Any of the following "fixes" this error:
FooClass
declaration in front of the declaration ofbar()
m.matches
check inside the list comprehensionassert isinstance(list2[0], FooClass)
before the returnThe text was updated successfully, but these errors were encountered: