Skip to content

Commit

Permalink
happier linter
Browse files Browse the repository at this point in the history
  • Loading branch information
dsweber2 committed Jun 25, 2024
1 parent f4d32e3 commit 4e1c26a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion R/epi_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ as_epi_df.tbl_df <- function(x, geo_type, time_type, as_of,
x <- guess_geo_column_name(x)
if (!test_subset(c("geo_value", "time_value"), names(x))) {
cli_abort(
"Either columns `geo_value` and `time_value` must be present in `x`, or related columns (see the internal functions `guess_time_column_name()` and/or `guess_geo_column_name()` for a complete list)."
"Either columns `geo_value` and `time_value` must be present in `x`, or related columns (see the internal
functions `guess_time_column_name()` and/or `guess_geo_column_name()` for a complete list)."
)
}

Expand Down
6 changes: 3 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,11 @@ guess_time_type <- function(time_value) {
#' "date" -> c("date", "Date")
#' "target_date" -> c("target_date", "Target_Date")
#' @keywords internal
upcase_snake_case <- function(x) {
X <- strsplit(x, "_") %>%
upcase_snake_case <- function(vec) {
VEC <- strsplit(vec, "_") %>%

Check warning on line 456 in R/utils.R

View workflow job for this annotation

GitHub Actions / lint

file=R/utils.R,line=456,col=3,[object_name_linter] Variable and function name style should match snake_case or symbols.
map(function(name) paste0(toupper(substr(name, 1, 1)), substr(name, 2, nchar(name)), collapse = "_")) %>%
unlist()
c(x, X)
c(vec, VEC)
}

#' rename potential time_value columns
Expand Down
2 changes: 1 addition & 1 deletion man/upcase_snake_case.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e1c26a

Please sign in to comment.