Skip to content

Commit

Permalink
Style code (GHA)
Browse files Browse the repository at this point in the history
  • Loading branch information
Moohan committed Nov 13, 2024
1 parent e26d1c6 commit eb9de37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/parse_row_filters.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ parse_row_filters <- function(row_filters) {
if (!is.list(row_filters) && !is.character(row_filters)) {
cli::cli_abort("{.arg row_filters} must be a named {.cls list} or a named {.cls character} vector, not a {.cls {class(row_filters)}}.")
}

# If it's a list, ensure it's depth 1 and elements are named
if (is.list(row_filters)) {
if (any(lengths(row_filters) > 1) || any(names(row_filters) == "")) {
cli::cli_abort("{.arg row_filters} must be a list of depth 1 with named elements.")
}
}

# If it's a character vector, ensure it's named
if (is.character(row_filters) && any(names(row_filters) == "")) {
cli::cli_abort("{.arg row_filters} must be a named character vector.")
Expand Down

0 comments on commit eb9de37

Please sign in to comment.