Skip to content

Commit

Permalink
lintr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Nov 14, 2024
1 parent 80af8a2 commit 5c839b5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions R/modules.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ setOldClass("teal_modules")
#' @param ui_args (named `list`) with additional arguments passed on to the UI function.
#' @param x (`teal_module` or `teal_modules`) Object to format/print.
#' @param transformators (`list` of `teal_transform_module`) that will be applied to transformator module's data input.
#' Each transformator module UI will appear in the `teal` application, unless the `custom_ui` attribute is set on the list.
#' If so, the module developer is responsible to display the UI in the module itself. `datanames` of the `transformators`
#' will be added to the `datanames`.
#' Each transformator module UI will appear in the `teal` application, unless the `custom_ui` attribute is set on the
#' list. If so, the module developer is responsible to display the UI in the module itself. `datanames` of the
#' `transformators` will be added to the `datanames`.
#'
#'
#' @param ...
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-init.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ testthat::test_that(
)

testthat::test_that(
"init does not throw warning when datanames in modules incompatible w/ datanames in data and there are transformators",
"init doesn't throw warning when datanames in modules incompatible w/ datanames in data and there are transformators",
{
testthat::expect_no_warning(
init(
Expand Down
5 changes: 4 additions & 1 deletion tests/testthat/test-modules.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ testthat::test_that("module() returns list of class 'teal_module' containing inp
ui_args = NULL
)
testthat::expect_s3_class(test_module, "teal_module")
testthat::expect_named(test_module, c("label", "server", "ui", "datanames", "server_args", "ui_args", "transformators"))
testthat::expect_named(
test_module,
c("label", "server", "ui", "datanames", "server_args", "ui_args", "transformators")
)
testthat::expect_identical(test_module$label, "aaa1")
testthat::expect_identical(test_module$server, call_module_server_fun)
testthat::expect_identical(test_module$ui, ui_fun1)
Expand Down
10 changes: 8 additions & 2 deletions vignettes/decorate-module-output.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,14 @@ tm_decorated_plot <- function(
)
}), 200)
plot_1_data_decorated <- srv_teal_transform_data("decorate_1", data = plot_1_data, transformators = decorators[[1]])
plot_2_data_decorated <- srv_teal_transform_data("decorate_2", data = plot_2_data, transformators = decorators[[2]])
plot_1_data_decorated <-

Check warning on line 481 in vignettes/decorate-module-output.Rmd

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=vignettes/decorate-module-output.Rmd,line=481,col=33,[trailing_whitespace_linter] Trailing whitespace is superfluous.
srv_teal_transform_data(
"decorate_1", data = plot_1_data, transformators = decorators[[1]]
)
plot_2_data_decorated <-

Check warning on line 485 in vignettes/decorate-module-output.Rmd

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=vignettes/decorate-module-output.Rmd,line=485,col=33,[trailing_whitespace_linter] Trailing whitespace is superfluous.
srv_teal_transform_data(
"decorate_2", data = plot_2_data, transformators = decorators[[2]]
)
plot_r <- reactive({
Expand Down

0 comments on commit 5c839b5

Please sign in to comment.