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

Function get_missing_protocol_members

mypy/messages.py:3179–3190  ·  view source on GitHub ↗

Find all protocol members of 'right' that are not implemented (i.e. completely missing) in 'left'.

(left: Instance, right: Instance, skip: list[str])

Source from the content-addressed store, hash-verified

3177
3178
3179def get_missing_protocol_members(left: Instance, right: Instance, skip: list[str]) -> list[str]:
3180 """Find all protocol members of 'right' that are not implemented
3181 (i.e. completely missing) in 'left'.
3182 """
3183 assert right.type.is_protocol
3184 missing: list[str] = []
3185 for member in right.type.protocol_members:
3186 if member in skip:
3187 continue
3188 if not find_member(member, left, left):
3189 missing.append(member)
3190 return missing
3191
3192
3193def get_conflict_protocol_types(

Callers 1

Calls 2

find_memberFunction · 0.90
appendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…