Skip to content

Commit

Permalink
Add list classes as appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Oct 3, 2021
1 parent e7e72e7 commit 08e5c7c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/external-info.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ external_info <- function() {
ex["lapack_version"] <- get_la_version()
names(ex) <- gsub("^lib", "", names(ex))

structure(as.list(ex), class = "external_info")
structure(as.list(ex), class = c("external_info", "list"))
}

get_tcl_version <- function() {
Expand Down
2 changes: 1 addition & 1 deletion R/platform-info.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ platform_info <- function() {
date = format(Sys.Date()),
rstudio_version = get_rstudio_version(),
pandoc_version = get_pandoc_version()
)), class = "platform_info")
)), class = c("platform_info", "list"))
}

get_rstudio_version <- function() {
Expand Down
2 changes: 1 addition & 1 deletion R/python-info.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ python_info <- function() {
"Python is not available"
}

class(conf) <- c("python_info", class(conf))
class(conf) <- unique(c("python_info", class(conf), "list"))
conf
}

Expand Down
2 changes: 1 addition & 1 deletion R/session-info.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ session_info <- function(
external = if ("external" %in% info) external_info(),
python = if ("python" %in% info) python_info()
)),
class = "session_info"
class = c("session_info", "list")
)

if (is_string(to_file)) {
Expand Down

0 comments on commit 08e5c7c

Please sign in to comment.