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

Method compute_fine_grained_deps

mypy/build.py:3538–3556  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
3540 if self.id in ("builtins", "typing", "types", "sys", "_typeshed"):
3541 # We don't track changes to core parts of typeshed -- the
3542 # assumption is that they are only changed as part of mypy
3543 # updates, which will invalidate everything anyway. These
3544 # will always be processed in the initial non-fine-grained
3545 # build. Other modules may be brought in as a result of an
3546 # fine-grained increment, and we may need these
3547 # dependencies then to handle cyclic imports.
3548 return {}
3549 from mypy.server.deps import get_dependencies # Lazy import to speed up startup
3550
3551 return get_dependencies(
3552 target=self.tree,
3553 type_map=self.type_map(),
3554 python_version=self.options.python_version,
3555 options=self.manager.options,
3556 )
3557
3558 def update_fine_grained_deps(self, deps: dict[str, set[str]]) -> None:
3559 options = self.manager.options

Callers 1

Calls 2

type_mapMethod · 0.95
get_dependenciesFunction · 0.90

Tested by

no test coverage detected