MCPcopy Create free account
hub / github.com/numpy/numpy / _strip_filename

Function _strip_filename

numpy/typing/tests/test_typing.py:77–81  ·  view source on GitHub ↗

Strip the filename and line number from a mypy message.

(msg: str)

Source from the content-addressed store, hash-verified

75
76
77def _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
84def strip_func(match: re.Match[str]) -> str:

Callers 4

test_successFunction · 0.85
test_failFunction · 0.85
test_revealFunction · 0.85
test_extended_precisionFunction · 0.85

Calls 2

stripMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected