Skip to content

Commit c0e81cb

Browse files
author
‘topepo’
committed
revert passing in predict
1 parent b9067af commit c0e81cb

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

R/aaa_multi_predict.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,15 @@ multi_predict <- function(object, ...) {
3131
multi_predict.default <- function(object, ...) {
3232
cli::cli_abort(
3333
"No {.fun multi_predict} method exists for objects with classes
34-
{.cls {class(object)}}.",
35-
call = rlang::caller_env()
34+
{.cls {class(object)}}."
3635
)
3736
}
3837

3938
#' @export
4039
predict.model_spec <- function(object, ...) {
4140
cli::cli_abort(
4241
"You must {.fun fit} your {.help [model specification](parsnip::model_spec)}
43-
before you can use {.fun predict}.",
44-
call = rlang::caller_env()
42+
before you can use {.fun predict}."
4543
)
4644
}
4745

tests/testthat/_snaps/misc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
Code
44
predict(lm_idea, mtcars)
55
Condition
6-
Error:
6+
Error in `predict()`:
77
! You must `fit()` your model specification (`?parsnip::model_spec()`) before you can use `predict()`.
88

99
---
1010

1111
Code
1212
multi_predict(lm_fit, mtcars)
1313
Condition
14-
Error:
14+
Error in `multi_predict()`:
1515
! No `multi_predict()` method exists for objects with classes <_lm/model_fit>.
1616

1717
---
1818

1919
Code
2020
multi_predict(extract_fit_engine(mars_fit), mtcars)
2121
Condition
22-
Error:
22+
Error in `multi_predict()`:
2323
! No `multi_predict()` method exists for objects with classes <earth>.
2424

2525
# combine_words helper works

0 commit comments

Comments
 (0)