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

Function update_callable_ids

mypy/join.py:737–744  ·  view source on GitHub ↗
(c: CallableType, ids: list[TypeVarId])

Source from the content-addressed store, hash-verified

735
736
737def update_callable_ids(c: CallableType, ids: list[TypeVarId]) -> CallableType:
738 tv_map = {}
739 tvs = []
740 for tv, new_id in zip(c.variables, ids):
741 new_tv = tv.copy_modified(id=new_id)
742 tvs.append(new_tv)
743 tv_map[tv.id] = new_tv
744 return expand_type(c, tv_map).copy_modified(variables=tvs)
745
746
747def match_generic_callables(t: CallableType, s: CallableType) -> tuple[CallableType, CallableType]:

Callers 1

match_generic_callablesFunction · 0.85

Calls 4

expand_typeFunction · 0.90
zipFunction · 0.85
appendMethod · 0.80
copy_modifiedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…