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

Function _key_func

numpy/typing/tests/test_typing.py:68–74  ·  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

66
67
68def _key_func(key: str) -> str:
69 """Split at the first occurrence of the ``:`` character.
70
71 Windows drive-letters (*e.g.* ``C:``) are ignored herein.
72 """
73 drive, tail = os.path.splitdrive(key)
74 return os.path.join(drive, tail.split(":", 1)[0])
75
76
77def _strip_filename(msg: str) -> tuple[int, str]:

Callers 1

run_mypyFunction · 0.85

Calls 2

joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected