Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Feb 28, 2025
1 parent e1efd02 commit a2bdf14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 3 additions & 5 deletions R/py_require.R
Original file line number Diff line number Diff line change
Expand Up @@ -648,16 +648,14 @@ uv_get_or_create_env <- function(packages = py_reqs_get("packages"),
c(
UV_CACHE_DIR = reticulate_cache_dir("uv", "cache"),
UV_PYTHON_INSTALL_DIR = reticulate_data_dir("uv", "python")
# UV_PYTHON_PREFERENCE = "only-managed"
)
))

resolved_python_version <-
resolve_python_version(constraints = python_version, uv = uv)

if (!length(resolved_python_version)) {
return()
# error?
return() # error?
}

# capture args; maybe used in error message later
Expand Down Expand Up @@ -782,7 +780,6 @@ uv_run_tool <- function(tool,
"tool",
"run",
"--isolated",
# "--python-preference managed",
if (length(python)) c("--python", python),
if (length(exclude_newer)) c("--exclude-newer", exclude_newer),
if (length(from)) c("--from", maybe_shQuote(from)),
Expand Down Expand Up @@ -825,7 +822,8 @@ uv_python_list <- function(uv = uv_binary()) {
"--all-versions",
# "--only-downloads",
# "--only-installed",
# "--python-preference managed",
# "--python-preference only-managed",
# "--python-preference only-system",
"--color never",
"--output-format json"
),
Expand Down
4 changes: 0 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,6 @@ reticulate_data_dir <- function(...) {
normalizePath(file.path(root, ...), mustWork = FALSE)
}





user_data_dir <- function(...) {
expand_env_vars(rappdirs::user_data_dir(...))
}
Expand Down

0 comments on commit a2bdf14

Please sign in to comment.