(path: str)
| 424 | |
| 425 | |
| 426 | def module_from_path(path: str) -> str: |
| 427 | path = re.sub(r"\.pyi?$", "", path) |
| 428 | # We can have a mix of Unix-style and Windows-style separators. |
| 429 | parts = re.split(r"[/\\]", path) |
| 430 | del parts[0] |
| 431 | module = ".".join(parts) |
| 432 | module = re.sub(r"\.__init__$", "", module) |
| 433 | return module |
| 434 | |
| 435 | |
| 436 | @dataclass |
searching dependent graphs…