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

Function _key_func

numpy/typing/tests/test_typing.py:50–56  ·  view source on GitHub ↗

Split at the first occurrence of the ``:`` character. Windows drive-letters (*e.g.* ``C:``) are ignored herein.

(key: str)

Source from the content-addressed store, hash-verified

48
49
50def _key_func(key: str) -> str:
51 """Split at the first occurrence of the ``:`` character.
52
53 Windows drive-letters (*e.g.* ``C:``) are ignored herein.
54 """
55 drive, tail = os.path.splitdrive(key)
56 return os.path.join(drive, tail.split(":", 1)[0])
57
58
59def _strip_filename(msg: str) -> tuple[int, str]:

Callers 1

run_mypyFunction · 0.85

Calls 2

joinMethod · 0.80
splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…