We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 975fbe5 commit cc99a6cCopy full SHA for cc99a6c
mypy/checkmember.py
@@ -783,7 +783,11 @@ def analyze_var(
783
call_type = get_proper_type(_analyze_member_access("__call__", typ, mx))
784
else:
785
call_type = typ
786
- if isinstance(call_type, Instance) and call_type.type.get_method("__call__"):
+ if (
787
+ isinstance(call_type, Instance)
788
+ and call_type.type.is_protocol
789
+ and call_type.type.get_method("__call__")
790
+ ):
791
792
793
if isinstance(call_type, FunctionLike) and not call_type.is_type_obj():
0 commit comments