(module: str, sys_path: list[str])
| 94 | |
| 95 | |
| 96 | def find_module_path_using_sys_path(module: str, sys_path: list[str]) -> str | None: |
| 97 | relative_candidates = ( |
| 98 | module.replace(".", "/") + ".py", |
| 99 | os.path.join(module.replace(".", "/"), "__init__.py"), |
| 100 | ) |
| 101 | for base in sys_path: |
| 102 | for relative_path in relative_candidates: |
| 103 | path = os.path.join(base, relative_path) |
| 104 | if os.path.isfile(path): |
| 105 | return path |
| 106 | return None |
| 107 | |
| 108 | |
| 109 | def find_module_path_and_all_py3( |
no test coverage detected
searching dependent graphs…