callable protocols cannot infer the type of their own self
#15188
Labels
bug
mypy got something wrong
self
#15188
Bug Report
Methods on protocols with a
__call__
method cannot infer the type ofself
as callable in other methods.
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.11&flags=strict&gist=7234281168a0762dd9a81b1f10d8a96a
Expected Behavior
I would expect that this would be inferred in
returnMe
the same way that it would be inexternalGet
.Actual Behavior
The text was updated successfully, but these errors were encountered: