Skip to content

Commit

Permalink
use !r instead of lengthy function call
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzwalthert committed Mar 9, 2021
1 parent f73fb10 commit 63fbca7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pre_commit/languages/r.py
Expand Up @@ -92,9 +92,7 @@ def install_environment(
cmd_output_b(
'Rscript', '--vanilla', '-e',
f"""\
prefix_dir <- "{
prefix.prefix_dir.encode('unicode_escape').decode()
}"
prefix_dir <- {prefix.prefix_dir!r}
missing_pkgs <- setdiff(
"renv", unname(installed.packages()[, "Package"])
)
Expand Down

0 comments on commit 63fbca7

Please sign in to comment.