MCPcopy Create free account
hub / github.com/python/mypy / get_dependencies

Function get_dependencies

mypy/server/deps.py:180–189  ·  view source on GitHub ↗

Get all dependencies of a node, recursively.

(
    target: MypyFile,
    type_map: dict[Expression, Type],
    python_version: tuple[int, int],
    options: Options,
)

Source from the content-addressed store, hash-verified

178
179
180def get_dependencies(
181 target: MypyFile,
182 type_map: dict[Expression, Type],
183 python_version: tuple[int, int],
184 options: Options,
185) -> dict[str, set[str]]:
186 """Get all dependencies of a node, recursively."""
187 visitor = DependencyVisitor(type_map, python_version, target.alias_deps, options)
188 target.accept(visitor)
189 return visitor.map
190
191
192def get_dependencies_of_target(

Callers 3

run_caseMethod · 0.90
dump_all_dependenciesFunction · 0.85

Calls 2

DependencyVisitorClass · 0.85
acceptMethod · 0.45

Tested by 1

run_caseMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…