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

Function _execute_r

pre_commit/languages/r.py:28–37  ·  view source on GitHub ↗
(
        code: str, *,
        prefix: Prefix, version: str, args: Sequence[str] = (), cwd: str,
        cli_opts: Sequence[str],
)

Source from the content-addressed store, hash-verified

26
27
28def _execute_r(
29 code: str, *,
30 prefix: Prefix, version: str, args: Sequence[str] = (), cwd: str,
31 cli_opts: Sequence[str],
32) -> str:
33 with in_env(prefix, version), _r_code_in_tempfile(code) as f:
34 _, out, _ = cmd_output(
35 _rscript_exec(), *cli_opts, f, *args, cwd=cwd,
36 )
37 return out.rstrip('\n')
38
39
40def _execute_r_in_renv(

Callers 2

_execute_r_in_renvFunction · 0.85
_execute_vanilla_rFunction · 0.85

Calls 4

cmd_outputFunction · 0.90
_r_code_in_tempfileFunction · 0.85
_rscript_execFunction · 0.85
in_envFunction · 0.70

Tested by

no test coverage detected