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
This doesn't work like this. You can't have arbitrary annotation on self (at least currently). There are similar requests, #5320, #5305. I am closing this as a duplicate of those.
mypy does not seem to like generic self types. Running mypy 0.620 with Python 3.6.6 on the following code
gives us
This is pretty weird --
y
should be anint
, notList[int]
, andmypy
seems to do the type inference in theget
method just fine.The text was updated successfully, but these errors were encountered: