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

Method patch_indirect_dependencies

mypy/build.py:3526–3536  ·  view source on GitHub ↗
(self, module_refs: set[str], types: set[Type])

Source from the content-addressed store, hash-verified

3524 self._type_checker = None
3525
3526 def patch_indirect_dependencies(self, module_refs: set[str], types: set[Type]) -> None:
3527 assert self.ancestors is not None
3528 existing_deps = set(self.dependencies + self.suppressed + self.ancestors)
3529 existing_deps.add(self.id)
3530
3531 encountered = self.manager.indirection_detector.find_modules(types) | module_refs
3532 for dep in sorted(encountered - existing_deps):
3533 if dep not in self.manager.modules:
3534 continue
3535 self.add_dependency(dep)
3536 self.priorities[dep] = PRI_INDIRECT
3537
3538 def compute_fine_grained_deps(self) -> dict[str, set[str]]:
3539 assert self.tree is not None

Callers 1

finish_passesMethod · 0.95

Calls 5

add_dependencyMethod · 0.95
setClass · 0.85
sortedFunction · 0.85
find_modulesMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected