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

Function module_prefix

mypy/util.py:95–99  ·  view source on GitHub ↗
(modules: Iterable[str], target: str)

Source from the content-addressed store, hash-verified

93
94
95def module_prefix(modules: Iterable[str], target: str) -> str | None:
96 result = split_target(modules, target)
97 if result is None:
98 return None
99 return result[0]
100
101
102def split_target(modules: Iterable[str], target: str) -> tuple[str, str] | None:

Callers 6

invert_depsFunction · 0.90
find_targets_recursiveFunction · 0.90
emit_load_finalMethod · 0.90

Calls 1

split_targetFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…