MCPcopy Index your code
hub / github.com/python/mypy / is_callable_protocol

Function is_callable_protocol

mypy/solve.py:598–602  ·  view source on GitHub ↗
(t: Type)

Source from the content-addressed store, hash-verified

596
597
598def is_callable_protocol(t: Type) -> bool:
599 proper_t = get_proper_type(t)
600 if isinstance(proper_t, Instance) and proper_t.type.is_protocol:
601 return "__call__" in proper_t.type.protocol_members
602 return False

Callers 1

pre_validate_solutionsFunction · 0.85

Calls 2

get_proper_typeFunction · 0.90
isinstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…