Strip the filename and line number from a mypy message.
(msg: str)
| 75 | |
| 76 | |
| 77 | def _strip_filename(msg: str) -> tuple[int, str]: |
| 78 | """Strip the filename and line number from a mypy message.""" |
| 79 | _, tail = os.path.splitdrive(msg) |
| 80 | _, lineno, msg = tail.split(":", 2) |
| 81 | return int(lineno), msg.strip() |
| 82 | |
| 83 | |
| 84 | def strip_func(match: re.Match[str]) -> str: |
no test coverage detected