Find a filesystem path for module `id` or `None` if not found.
(id: str, manager: BuildManager)
| 3859 | |
| 3860 | |
| 3861 | def find_module_simple(id: str, manager: BuildManager) -> str | None: |
| 3862 | """Find a filesystem path for module `id` or `None` if not found.""" |
| 3863 | if manager.stats_enabled: |
| 3864 | t0 = time.time() |
| 3865 | x = manager.find_module_cache.find_module(id, fast_path=True) |
| 3866 | if manager.stats_enabled: |
| 3867 | manager.add_stats(find_module_time=time.time() - t0, find_module_calls=1) |
| 3868 | if isinstance(x, ModuleNotFoundReason): |
| 3869 | return None |
| 3870 | return x |
| 3871 | |
| 3872 | |
| 3873 | def find_module_with_reason(id: str, manager: BuildManager) -> ModuleSearchResult: |
no test coverage detected
searching dependent graphs…