Split at the first occurrence of the ``:`` character. Windows drive-letters (*e.g.* ``C:``) are ignored herein.
(key: str)
| 48 | |
| 49 | |
| 50 | def _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 | |
| 59 | def _strip_filename(msg: str) -> tuple[int, str]: |