MCPcopy Index your code
hub / github.com/numpy/numpy / _strip_filename

Function _strip_filename

numpy/typing/tests/test_typing.py:59–63  ·  view source on GitHub ↗

Strip the filename and line number from a mypy message.

(msg: str)

Source from the content-addressed store, hash-verified

57
58
59def _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
66def strip_func(match: re.Match[str]) -> str:

Callers 2

test_passFunction · 0.85
test_revealFunction · 0.85

Calls 2

splitMethod · 0.80
stripMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…