Skip to content

Commit

Permalink
check_tailor() in helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Sep 12, 2024
1 parent b669901 commit 33cc542
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ is_tailor <- function(x) {
#' @keywords internal
#' @rdname tailor-internals
tailor_fully_trained <- function(x) {
check_tailor(x)

if (length(x$adjustments) == 0L) {
return(FALSE)
}
Expand All @@ -77,6 +79,8 @@ tailor_adjustment_trained <- function(x) {
#' @keywords internal
#' @rdname tailor-internals
tailor_requires_fit <- function(x) {
check_tailor(x)

any(purrr::map_lgl(x$adjustments, tailor_adjustment_requires_fit))
}

Expand Down

0 comments on commit 33cc542

Please sign in to comment.