(path: str)
| 49 | |
| 50 | |
| 51 | def _basename(path: str) -> str: |
| 52 | # os.path.basename on POSIX does not split a Windows `\` separator, so a |
| 53 | # Windows-style source_file (`C:\proj\Unit.pas`) would keep the whole string |
| 54 | # as its "basename" and never match the relativised POSIX corpus path. |
| 55 | # Normalise separators first so the match works cross-platform (#5286). |
| 56 | return os.path.basename(path.replace("\\", "/")) |
| 57 | |
| 58 | |
| 59 | def _unit_stem(source_file: str) -> str: |
no outgoing calls
no test coverage detected