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
test.py:25: error: Need type annotation for "x" [var-annotated]
test.py:25: error: Argument 1 to "__call__" of "MyCallable" has incompatible type "int"; expected Never [arg-type]
The text was updated successfully, but these errors were encountered:
I noticed something really weird about callback protocols. Consider the following example:
It works fine with mypy
1.10.0
(although it fails to check with pyright1.1.360
: microsoft/pyright#7782).However, adding a
__name__: str
field to the protocol changes the checks performed by mypy. The example becomes:And it fails with:
The text was updated successfully, but these errors were encountered: