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
file1.py: note: In function "func":
file1.py:8: error: Revealed type is 'Union[file1.B, file1.C]'
file1.py:10: error: Revealed type is 'file1.B'
file1.py:13: error: Revealed type is 'Union[<ERROR>, <ERROR>]'
file1.py:14: error: Some element of union has no attribute "name"
On that second case: inheriting from Any is illegal (though it can happen legally when you inherit from a class whose import is suppressed by --silent-imports).
union_any.py
:mypy union_any.py
:mypy --py2 union_any.py
:I discovered this when I used a class which was defined in some library which did not have stubs and I was using
--silent-imports
.The text was updated successfully, but these errors were encountered: