MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / _cmd_filenames

Function _cmd_filenames

pre_commit/commands/hazmat.py:30–41  ·  view source on GitHub ↗
(cmd: tuple[str, ...])

Source from the content-addressed store, hash-verified

28
29
30def _cmd_filenames(cmd: tuple[str, ...]) -> tuple[
31 tuple[str, ...],
32 tuple[str, ...],
33]:
34 for idx, val in enumerate(reversed(cmd)):
35 if val == '--':
36 split = len(cmd) - idx
37 break
38 else:
39 raise SystemExit('hazmat entry must end with `--`')
40
41 return cmd[:split - 1], cmd[split:]
42
43
44def cd(subdir: str, cmd: tuple[str, ...]) -> int:

Callers 6

cdFunction · 0.85
n1Function · 0.85

Calls

no outgoing calls