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
Looking into this, SpooledTemporaryFile is a function in typeshed, but it’s a class in my /usr/lib/python3.6/tempfile.py. Is the typeshed annotation wrong?
In any case, it would be nice if the error message could indicate that SpooledTemporaryFile is not a valid type because it is a function, rather than just saying "invalid type".
Consider the following file:
When I typecheck this, I get
This message is not helpful; what does it mean for a type to be "invalid", and why is
SpooledTemporaryFile
invalid?If I add a type annotation as suggested by the second message, I get the "invalid" message twice:
I am using Mypy 0.620.
The text was updated successfully, but these errors were encountered: