Skip to content

Commit 3255ac4

Browse files
committed
don't check class in class-specific prints
1 parent 093fac0 commit 3255ac4

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

R/epidatacall.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ request_arguments <- function(epidata_call, format_type, fields = NULL) {
121121

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

201200
#' @export
202201
print.fetch_args <- function(x, ...) {
203-
stopifnot(inherits(x, "fetch_args"))
204202
cli::cli_h1("<fetch_args> object:")
205203
# Print all non-class fields.
206204
print(x[attr(x, "names")])

R/model.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ epirange <- function(from, to) {
6363

6464
#' @export
6565
print.EpiRange <- function(x, ...) {
66-
stopifnot(inherits(x, "EpiRange"))
67-
6866
if (nchar(x$from) == 8) {
6967
date_type <- "Days" # nolint: object_usage_linter
7068
x$from <- as.Date(as.character(x$from), "%Y%m%d")
@@ -143,7 +141,6 @@ create_epidata_field_info <- function(name,
143141

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

0 commit comments

Comments
 (0)