Skip to content

Commit

Permalink
don't check class in class-specific prints
Browse files Browse the repository at this point in the history
  • Loading branch information
nmdefries committed Jan 4, 2024
1 parent 093fac0 commit 3255ac4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions R/epidatacall.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ request_arguments <- function(epidata_call, format_type, fields = NULL) {

#' @export
print.epidata_call <- function(x, ...) {
stopifnot(inherits(x, "epidata_call"))
cli::cli_h1("<epidata_call> object:")
cli::cli_bullets(c(
"*" = "Pipe this object into `fetch()` to actually fetch the data",
Expand Down Expand Up @@ -200,7 +199,6 @@ fetch_args_list <- function(

#' @export
print.fetch_args <- function(x, ...) {
stopifnot(inherits(x, "fetch_args"))
cli::cli_h1("<fetch_args> object:")
# Print all non-class fields.
print(x[attr(x, "names")])
Expand Down
3 changes: 0 additions & 3 deletions R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ epirange <- function(from, to) {

#' @export
print.EpiRange <- function(x, ...) {
stopifnot(inherits(x, "EpiRange"))

if (nchar(x$from) == 8) {
date_type <- "Days" # nolint: object_usage_linter
x$from <- as.Date(as.character(x$from), "%Y%m%d")
Expand Down Expand Up @@ -143,7 +141,6 @@ create_epidata_field_info <- function(name,

#' @export
print.EpidataFieldInfo <- function(x, ...) {
stopifnot(inherits(x, "EpidataFieldInfo"))
cli::cli_h1("<EpidataFieldInfo> object:")
# Print all non-class fields.
print(x[attr(x, "names")])
Expand Down

0 comments on commit 3255ac4

Please sign in to comment.