Skip to content

Commit

Permalink
Merge pull request #281 from cmu-delphi/check_dots_empty
Browse files Browse the repository at this point in the history
Check dots empty
  • Loading branch information
dajmcdon authored Jan 13, 2024
2 parents 8d63d49 + da61c6d commit 1aa87bf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions R/arx_forecaster.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ arx_args_list <- function(
nafill_buffer = Inf,
...) {
# error checking if lags is a list
rlang::check_dots_empty()
.lags <- lags
if (is.list(lags)) lags <- unlist(lags)

Expand Down
1 change: 1 addition & 0 deletions R/layer_add_target_date.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ layer_add_target_date_new <- function(id = id, target_date = target_date) {

#' @export
slather.layer_add_target_date <- function(object, components, workflow, new_data, ...) {
rlang::check_dots_empty()
the_recipe <- workflows::extract_recipe(workflow)
the_frosting <- extract_frosting(workflow)

Expand Down
1 change: 1 addition & 0 deletions R/layer_cdc_flatline_quantiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ layer_cdc_flatline_quantiles_new <- function(
#' @export
slather.layer_cdc_flatline_quantiles <-
function(object, components, workflow, new_data, ...) {
rlang::check_dots_empty()
if (is.null(object$quantile_levels)) {
return(components)
}
Expand Down
1 change: 1 addition & 0 deletions R/layer_point_from_distn.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ layer_point_from_distn_new <- function(type, name, id) {
#' @export
slather.layer_point_from_distn <-
function(object, components, workflow, new_data, ...) {
rlang::check_dots_empty()
dstn <- components$predictions$.pred
if (!inherits(dstn, "distribution")) {
rlang::warn(
Expand Down
1 change: 1 addition & 0 deletions R/layer_population_scaling.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ layer_population_scaling_new <-
#' @export
slather.layer_population_scaling <-
function(object, components, workflow, new_data, ...) {
rlang::check_dots_empty()
stopifnot(
"Only one population column allowed for scaling" =
length(object$df_pop_col) == 1
Expand Down

0 comments on commit 1aa87bf

Please sign in to comment.