Skip to content

Commit

Permalink
ensure pkg is character
Browse files Browse the repository at this point in the history
don't return early in autoimport_ask()
fixes #26
  • Loading branch information
DanChaltiel committed Nov 14, 2024
1 parent 109e381 commit 50eddd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/ai_ask.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ autoimport_ask = function(data_imports, ns, importlist_path, verbose){
distinct(fun, pkg) %>%
left_join(pref_importlist, by="fun")

if(nrow(unsure_funs)==0) return(data_imports)

if(verbose>0) cli_h1("Attributing")
# rtn = list()
defined_funs = unsure_funs %>%
filter(!is.na(pref_pkg))
undefined_funs = unsure_funs %>%
filter(is.na(pref_pkg))

if(verbose>0 && nrow(unsure_funs)>0){
cli_h1("Attributing")
}

if(verbose>0 && nrow(defined_funs)>0){
cli_inform(c(i="Automatically attributing {nrow(defined_funs)} function import{?s}
as predefined in {.file {importlist_path}}"))
Expand Down

0 comments on commit 50eddd8

Please sign in to comment.