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

Function _inline_r_setup

pre_commit/languages/r.py:245–259  ·  view source on GitHub ↗

Some behaviour of R cannot be configured via env variables, but can only be configured via R options once R has started. These are set here.

(code: str)

Source from the content-addressed store, hash-verified

243
244
245def _inline_r_setup(code: str) -> str:
246 """
247 Some behaviour of R cannot be configured via env variables, but can
248 only be configured via R options once R has started. These are set here.
249 """
250 with_option = [
251 textwrap.dedent("""\
252 options(
253 install.packages.compile.from.source = "never",
254 pkgType = "binary"
255 )
256 """),
257 code,
258 ]
259 return '\n'.join(with_option)
260
261
262def run_hook(

Callers 1

_r_code_in_tempfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected