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

Function hook_impl

pre_commit/commands/hook_impl.py:259–275  ·  view source on GitHub ↗
(
        store: Store,
        *,
        config: str,
        color: bool,
        hook_type: str,
        hook_dir: str | None,
        skip_on_missing_config: bool,
        args: Sequence[str],
)

Source from the content-addressed store, hash-verified

257
258
259def hook_impl(
260 store: Store,
261 *,
262 config: str,
263 color: bool,
264 hook_type: str,
265 hook_dir: str | None,
266 skip_on_missing_config: bool,
267 args: Sequence[str],
268) -> int:
269 retv, stdin = _run_legacy(hook_type, hook_dir, args)
270 _validate_config(retv, config, skip_on_missing_config)
271 ns = _run_ns(hook_type, color, args, stdin)
272 if ns is None:
273 return retv
274 else:
275 return retv | run(config, store, ns)

Callers 1

mainFunction · 0.90

Calls 4

runFunction · 0.90
_run_legacyFunction · 0.85
_validate_configFunction · 0.85
_run_nsFunction · 0.85

Tested by

no test coverage detected