Open
Description
class X:
def f(self) -> None:
pass
reveal_type(X().f)
reveal_type(X().f.__self__)
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
.
Playground: https://mypy-play.net/?mypy=latest&python=3.11&gist=0de8d7a90f1d3770b3b600052c1671b1