(root: Path, file: Path)
| 7 | |
| 8 | |
| 9 | def path_to_module(root: Path, file: Path) -> str: |
| 10 | rel = file.relative_to(root) |
| 11 | parts = rel.with_suffix("").parts |
| 12 | if parts[-1] == "__init__": |
| 13 | parts = parts[:-1] |
| 14 | return ".".join((root.name, *parts)) if parts else root.name |
| 15 | |
| 16 | |
| 17 | def module_to_file_map(root: Path) -> dict[str, Path]: |
no outgoing calls
no test coverage detected