MCPcopy
hub / github.com/python/mypy / module_to_path

Function module_to_path

mypy/test/teststubgen.py:1644–1650  ·  view source on GitHub ↗
(out_dir: str, module: str)

Source from the content-addressed store, hash-verified

1642
1643
1644def module_to_path(out_dir: str, module: str) -> str:
1645 fnam = os.path.join(out_dir, f"{module.replace('.', '/')}.pyi")
1646 if not os.path.exists(fnam):
1647 alt_fnam = fnam.replace(".pyi", "/__init__.pyi")
1648 if os.path.exists(alt_fnam):
1649 return alt_fnam
1650 return fnam

Callers 1

run_case_innerMethod · 0.85

Calls 3

replaceMethod · 0.80
existsMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…