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

Function find_module_with_reason

mypy/build.py:3873–3880  ·  view source on GitHub ↗

Find a filesystem path for module `id` or the reason it can't be found.

(id: str, manager: BuildManager)

Source from the content-addressed store, hash-verified

3871
3872
3873def find_module_with_reason(id: str, manager: BuildManager) -> ModuleSearchResult:
3874 """Find a filesystem path for module `id` or the reason it can't be found."""
3875 if manager.stats_enabled:
3876 t0 = time.time()
3877 x = manager.find_module_cache.find_module(id, fast_path=False)
3878 if manager.stats_enabled:
3879 manager.add_stats(find_module_time=time.time() - t0, find_module_calls=1)
3880 return x
3881
3882
3883def in_partial_package(id: str, manager: BuildManager) -> bool:

Callers 1

find_module_and_diagnoseFunction · 0.85

Calls 2

add_statsMethod · 0.80
find_moduleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…