Skip to content

Commit 3e9a6d8

Browse files
committed
more specific imports for #141
1 parent 5bc61d8 commit 3e9a6d8

File tree

5 files changed

+24
-3
lines changed

5 files changed

+24
-3
lines changed

NAMESPACE

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ export(translate)
129129
export(varying)
130130
export(varying_args)
131131
export(xgb_train)
132-
import(rlang)
133132
importFrom(dplyr,arrange)
134133
importFrom(dplyr,as_tibble)
135134
importFrom(dplyr,bind_cols)
@@ -163,7 +162,25 @@ importFrom(purrr,map_dbl)
163162
importFrom(purrr,map_df)
164163
importFrom(purrr,map_dfr)
165164
importFrom(purrr,map_lgl)
165+
importFrom(rlang,abort)
166+
importFrom(rlang,call2)
167+
importFrom(rlang,caller_env)
168+
importFrom(rlang,current_env)
169+
importFrom(rlang,enquo)
170+
importFrom(rlang,enquos)
166171
importFrom(rlang,eval_tidy)
172+
importFrom(rlang,expr)
173+
importFrom(rlang,get_expr)
174+
importFrom(rlang,is_empty)
175+
importFrom(rlang,is_missing)
176+
importFrom(rlang,is_null)
177+
importFrom(rlang,is_quosure)
178+
importFrom(rlang,is_symbolic)
179+
importFrom(rlang,lgl)
180+
importFrom(rlang,ll)
181+
importFrom(rlang,missing_arg)
182+
importFrom(rlang,quo_get_expr)
183+
importFrom(rlang,quos)
167184
importFrom(rlang,sym)
168185
importFrom(rlang,syms)
169186
importFrom(stats,.checkMFClasses)

R/arguments.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#' @import rlang
2-
1+
#' @importFrom rlang expr enquos enquo quos is_quosure call2 quo_get_expr ll
2+
#' @importFrom rlang abort current_env get_expr is_missing is_null is_symbolic missing_arg
33
null_value <- function(x) {
44
res <- if(is_quosure(x))
55
isTRUE(all.equal(x[[-1]], quote(NULL))) else

R/descriptors.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ poke_descrs <- function(descrs) {
399399
# frame = evaluation frame of when the on.exit() call is made
400400
# we generally set it to whatever fn calls scoped_descrs()
401401
# which should be inside of fit()
402+
#' @importFrom rlang caller_env
402403
scoped_descrs <- function(descrs, frame = caller_env()) {
403404
old <- poke_descrs(descrs)
404405

R/misc.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#' @param prefix A character string for a class.
66
#' @return A character vector.
77
#' @keywords internal
8+
#' @importFrom rlang is_empty
89
#' @export
910
make_classes <- function(prefix) {
1011
c(prefix, "model_spec")
@@ -50,6 +51,7 @@ print_arg_list <- function(x, ...) {
5051
#' @param x A model object.
5152
#' @param ... Not currently used.
5253
#' @keywords internal
54+
#' @importFrom rlang lgl
5355
#' @export
5456
model_printer <- function(x, ...) {
5557
non_null_args <- x$args[!vapply(x$args, null_value, lgl(1))]

R/translate.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ translate <- function (x, ...)
4646

4747
#' @importFrom utils getFromNamespace
4848
#' @importFrom purrr list_modify
49+
#' @importFrom rlang lgl
4950
#' @export
5051
translate.default <- function(x, engine = x$engine, ...) {
5152
check_empty_ellipse(...)

0 commit comments

Comments
 (0)