Skip to content

Commit c542ff9

Browse files
Merge pull request #107 from tidymodels/only-cli
2 parents 3f4d26a + 740d3b5 commit c542ff9

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Imports:
3030
cli,
3131
dials,
3232
dplyr,
33-
glue,
3433
purrr,
3534
rlang (>= 1.1.0),
3635
stats,

R/lightgbm.R

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,9 @@ sort_args <- function(args) {
309309
if (any(names(args) %in% protected)) {
310310
protected_args <- names(args[names(args) %in% protected])
311311

312-
rlang::warn(
313-
glue::glue(
314-
"The following argument(s) are guarded by bonsai and will not ",
315-
"be passed to LightGBM: {glue::glue_collapse(protected_args, sep = ', ')}"
316-
)
312+
cli::cli_warn(
313+
"The following argument{?s} {?is/are} guarded by bonsai and will not be
314+
passed to LightGBM: {protected_args}."
317315
)
318316

319317
args[protected_args] <- NULL

tests/testthat/_snaps/lightgbm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
1:ncol(penguins))), "regression"), bill_length_mm ~ ., data = penguins)
5252
Condition
5353
Warning:
54-
The following argument(s) are guarded by bonsai and will not be passed to LightGBM: colnames
54+
The following argument is guarded by bonsai and will not be passed to LightGBM: colnames.
5555

5656
---
5757

@@ -61,7 +61,7 @@
6161
bill_length_mm ~ ., data = penguins)
6262
Condition
6363
Warning:
64-
The following argument(s) are guarded by bonsai and will not be passed to LightGBM: colnames, callbacks
64+
The following arguments are guarded by bonsai and will not be passed to LightGBM: colnames and callbacks.
6565

6666
---
6767

@@ -70,7 +70,7 @@
7070
1:ncol(penguins))), "regression"), bill_length_mm ~ ., data = penguins)
7171
Condition
7272
Warning:
73-
The following argument(s) are guarded by bonsai and will not be passed to LightGBM: colnames
73+
The following argument is guarded by bonsai and will not be passed to LightGBM: colnames.
7474

7575
---
7676

0 commit comments

Comments
 (0)