Strip the filename and line number from a mypy message.
(msg: str)
| 57 | |
| 58 | |
| 59 | def _strip_filename(msg: str) -> tuple[int, str]: |
| 60 | """Strip the filename and line number from a mypy message.""" |
| 61 | _, tail = os.path.splitdrive(msg) |
| 62 | _, lineno, msg = tail.split(":", 2) |
| 63 | return int(lineno), msg.strip() |
| 64 | |
| 65 | |
| 66 | def strip_func(match: re.Match[str]) -> str: |
no test coverage detected
searching dependent graphs…