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

Function _cmd_from_hook

pre_commit/languages/r.py:176–187  ·  view source on GitHub ↗
(
        prefix: Prefix,
        entry: str,
        args: Sequence[str],
        *,
        is_local: bool,
)

Source from the content-addressed store, hash-verified

174
175
176def _cmd_from_hook(
177 prefix: Prefix,
178 entry: str,
179 args: Sequence[str],
180 *,
181 is_local: bool,
182) -> tuple[str, ...]:
183 cmd = shlex.split(entry)
184 _entry_validate(cmd)
185
186 cmd_part = _prefix_if_file_entry(cmd, prefix, is_local=is_local)
187 return (cmd[0], *_RENV_ACTIVATED_OPTS, *cmd_part, *args)
188
189
190def install_environment(

Callers 1

run_hookFunction · 0.85

Calls 2

_entry_validateFunction · 0.85
_prefix_if_file_entryFunction · 0.85

Tested by

no test coverage detected