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

Function run_hook

pre_commit/languages/pygrep.py:90–101  ·  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

88
89
90def run_hook(
91 prefix: Prefix,
92 entry: str,
93 args: Sequence[str],
94 file_args: Sequence[str],
95 *,
96 is_local: bool,
97 require_serial: bool,
98 color: bool,
99) -> tuple[int, bytes]:
100 cmd = (sys.executable, '-m', __name__, *args, entry)
101 return xargs(cmd, file_args, color=color)
102
103
104def main(argv: Sequence[str] | None = None) -> int:

Callers

nothing calls this directly

Calls 1

xargsFunction · 0.90

Tested by

no test coverage detected