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
I'd expect X().f to be some Callable derived generic type for bound methods.
I'd expect X().f.__self__ to be typed X. Currently __self__ is defined in the typeshed for types.MethodType as returning object.
main.py:4: error: "Callable[[A], None]" has no attribute "__self__" [attr-defined]
main.py:5: error: "Callable[[], None]" has no attribute "__self__" [attr-defined]
I'd expect
X().f
to be someCallable
derived generic type for bound methods.I'd expect
X().f.__self__
to be typedX
. Currently__self__
is defined in the typeshed fortypes.MethodType
as returningobject
.Playground: https://mypy-play.net/?mypy=latest&python=3.11&gist=0de8d7a90f1d3770b3b600052c1671b1
The text was updated successfully, but these errors were encountered: