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

Function impl

pre_commit/commands/hazmat.py:74–83  ·  view source on GitHub ↗
(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

72
73
74def impl(args: argparse.Namespace) -> int:
75 args.cmd = tuple(args.cmd)
76 if args.tool == 'cd':
77 return cd(args.subdir, args.cmd)
78 elif args.tool == 'ignore-exit-code':
79 return ignore_exit_code(args.cmd)
80 elif args.tool == 'n1':
81 return n1(args.cmd)
82 else:
83 raise NotImplementedError(f'unexpected tool: {args.tool}')
84
85
86def main(argv: Sequence[str] | None = None) -> int:

Callers 1

mainFunction · 0.85

Calls 3

cdFunction · 0.85
ignore_exit_codeFunction · 0.85
n1Function · 0.85

Tested by

no test coverage detected