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

Function run_hook

pre_commit/languages/unsupported_script.py:15–32  ·  view source on GitHub ↗
(
        prefix: Prefix,
        entry: str,
        args: Sequence[str],
        file_args: Sequence[str],
        *,
        is_local: bool,
        require_serial: bool,
        color: bool,
)

Source from the content-addressed store, hash-verified

13
14
15def run_hook(
16 prefix: Prefix,
17 entry: str,
18 args: Sequence[str],
19 file_args: Sequence[str],
20 *,
21 is_local: bool,
22 require_serial: bool,
23 color: bool,
24) -> tuple[int, bytes]:
25 cmd = lang_base.hook_cmd(entry, args)
26 cmd = (prefix.path(cmd[0]), *cmd[1:])
27 return lang_base.run_xargs(
28 cmd,
29 file_args,
30 require_serial=require_serial,
31 color=color,
32 )

Callers

nothing calls this directly

Calls 1

pathMethod · 0.80

Tested by

no test coverage detected