From 3255ac4ed37d214c9554acb73f9db2d29efeb082 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:26:55 -0500 Subject: [PATCH] don't check class in class-specific prints --- R/epidatacall.R | 2 -- R/model.R | 3 --- 2 files changed, 5 deletions(-) diff --git a/R/epidatacall.R b/R/epidatacall.R index a7a17072..b9f7d153 100644 --- a/R/epidatacall.R +++ b/R/epidatacall.R @@ -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(" object:") cli::cli_bullets(c( "*" = "Pipe this object into `fetch()` to actually fetch the data", @@ -200,7 +199,6 @@ fetch_args_list <- function( #' @export print.fetch_args <- function(x, ...) { - stopifnot(inherits(x, "fetch_args")) cli::cli_h1(" object:") # Print all non-class fields. print(x[attr(x, "names")]) diff --git a/R/model.R b/R/model.R index d4885f00..38923145 100644 --- a/R/model.R +++ b/R/model.R @@ -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") @@ -143,7 +141,6 @@ create_epidata_field_info <- function(name, #' @export print.EpidataFieldInfo <- function(x, ...) { - stopifnot(inherits(x, "EpidataFieldInfo")) cli::cli_h1(" object:") # Print all non-class fields. print(x[attr(x, "names")])