Skip to content

Commit 24537f3

Browse files
committed
Style the R files
1 parent 677075f commit 24537f3

File tree

4 files changed

+33
-25
lines changed

4 files changed

+33
-25
lines changed

R/tm_data_table.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ tm_data_table <- function(label = "Data Table",
123123
})
124124
}
125125
if (!is.null(datasets_selected)) {
126-
lifecycle::deprecate_stop(when = "0.4.0",
127-
what = "tm_data_table(datasets_selected = 'is deprecated, use `datanames`')")
126+
lifecycle::deprecate_stop(
127+
when = "0.4.0",
128+
what = "tm_data_table(datasets_selected = 'is deprecated, use `datanames`')"
129+
)
128130
}
129131
checkmate::assert_character(datanames, min.len = 0, min.chars = 1, null.ok = TRUE)
130132
checkmate::assert(

R/tm_front_page.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,15 @@ tm_front_page <- function(label = "Front page",
8080
checkmate::assert_multi_class(additional_tags, classes = c("shiny.tag.list", "html"))
8181
checkmate::assert_character(footnotes, min.len = 0, any.missing = FALSE)
8282
if (!is.null(show_metadata)) {
83-
lifecycle::deprecate_stop(when = "0.4.0",
84-
what = "tm_front_page(show_metadata = 'is deprecated, use `datanames`')")
83+
lifecycle::deprecate_stop(
84+
when = "0.4.0",
85+
what = "tm_front_page(show_metadata = 'is deprecated, use `datanames`')"
86+
)
8587
}
86-
checkmate::assert_character(datanames, min.len = 0, min.chars = 1,
87-
null.ok = TRUE)
88+
checkmate::assert_character(datanames,
89+
min.len = 0, min.chars = 1,
90+
null.ok = TRUE
91+
)
8892

8993
# End of assertions
9094

R/tm_variable_browser.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ tm_variable_browser <- function(label = "Variable Browser",
103103
# Start of assertions
104104
checkmate::assert_string(label)
105105
if (!is.null(datasets_selected)) {
106-
lifecycle::deprecate_stop(when = "0.4.0",
107-
what = "tm_variable_browser(datasets_selected = 'is deprecated, use `datanames`')")
106+
lifecycle::deprecate_stop(
107+
when = "0.4.0",
108+
what = "tm_variable_browser(datasets_selected = 'is deprecated, use `datanames`')"
109+
)
108110
}
109111
checkmate::assert_character(datanames, min.len = 0, min.chars = 1, null.ok = TRUE)
110112
checkmate::assert_character(parent_dataname, min.len = 0, max.len = 1)

tests/testthat/test-shinytest2-tm_data_table.R

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -104,24 +104,24 @@ test_that("e2e - tm_data_table: Verify error on datasets_selected", {
104104
skip_if_too_deep(5)
105105
app_driver <- function() {
106106
init_teal_app_driver(
107-
data = simple_teal_data(),
108-
modules = tm_data_table(
109-
label = "Data Table",
110-
variables_selected = list(
111-
iris = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species")
112-
),
113-
datasets_selected = c("iris", "mtcars"),
114-
dt_args = list(caption = "Table Caption"),
115-
dt_options = list(
116-
searching = FALSE, pageLength = 30, lengthMenu = c(5, 15, 30, 100),
117-
scrollX = TRUE
107+
data = simple_teal_data(),
108+
modules = tm_data_table(
109+
label = "Data Table",
110+
variables_selected = list(
111+
iris = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species")
112+
),
113+
datasets_selected = c("iris", "mtcars"),
114+
dt_args = list(caption = "Table Caption"),
115+
dt_options = list(
116+
searching = FALSE, pageLength = 30, lengthMenu = c(5, 15, 30, 100),
117+
scrollX = TRUE
118+
),
119+
server_rendering = FALSE,
120+
pre_output = NULL,
121+
post_output = NULL
118122
),
119-
server_rendering = FALSE,
120-
pre_output = NULL,
121-
post_output = NULL
122-
),
123-
timeout = 3000
124-
)
123+
timeout = 3000
124+
)
125125
}
126126
expect_error(app_driver())
127127
})

0 commit comments

Comments
 (0)