Skip to content

Commit 922573c

Browse files
Merge branch 'main' into fix-cran-warning
2 parents 1e52d5a + 1fc5b13 commit 922573c

39 files changed

+5
-73
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default_language_version:
66

77
repos:
88
- repo: https://github.com/lorenzwalthert/precommit
9-
rev: f3498c421d68a1db26de1a1fe3ecc91dd6f03b5e
9+
rev: v0.3.2.9019
1010
hooks:
1111
- id: style-files
1212
args:

R/nest.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ nest_parse_data <- function(pd_flat) {
343343

344344
rhs <- nest_(child, "child", setdiff(names(child), "parent_"))
345345

346-
nested <- left_join(internal, rhs, by = c("id" = "parent_"))
346+
nested <- left_join(internal, rhs, by = c(id = "parent_"))
347347

348348
children <- nested$child
349349
for (i in seq_along(children)) {

R/testing.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ local_test_setup <- function(cache = FALSE,
327327
.local_envir = parent.frame()) {
328328
current_cache <- cache_info(format = "tabular")
329329
withr::local_options(
330-
list("styler.quiet" = TRUE, "R.cache.rootPath" = tempfile()),
330+
list(styler.quiet = TRUE, R.cache.rootPath = tempfile()),
331331
.local_envir = .local_envir
332332
)
333333
if (cache) {

R/ui-caching.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ cache_info <- function(cache_name = NULL, format = "both") {
138138
#' @export
139139
cache_activate <- function(cache_name = NULL,
140140
verbose = !getOption("styler.quiet", FALSE)) {
141-
options("styler.cache_name" = cache_name %||% styler_version)
141+
options(styler.cache_name = cache_name %||% styler_version)
142142
path <- cache_find_path(cache_name)
143143

144144
if (verbose) {
@@ -155,7 +155,7 @@ cache_activate <- function(cache_name = NULL,
155155
#' @rdname cache_activate
156156
#' @export
157157
cache_deactivate <- function(verbose = !getOption("styler.quiet", FALSE)) {
158-
options("styler.cache_name" = NULL)
158+
options(styler.cache_name = NULL)
159159

160160
if (verbose) {
161161
cat("Deactivated cache.\n")

tests/testthat/test-create_token.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
test_that("can create a token that has relevant columns", {
42
pd_names <- c(
53
"token", "text", "short", "lag_newlines", "newlines", "pos_id",

tests/testthat/test-create_tree.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
test_that("create_trees outputs identical structure if trees have same structure", {
42
skip_if_not_installed("DiagrammeR")
53
skip_if_not_installed("data.tree")

tests/testthat/test-curly-curly.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
test_that("curly-culry", {
42
expect_warning(test_collection("curly-curly",
53
"mixed",

tests/testthat/test-exception_handling.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
test_that("style_text returns custom error", {
42
expect_error(style_text("a <- 3 4"), "unexpected numeric constant")
53
})

tests/testthat/test-helpers.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
test_that("can construct and print vertical", {
42
skip_if_not_installed("prettycode")
53
expect_snapshot({

tests/testthat/test-identify-roxygen-examples.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
#' Things to consider:
42
#' * one function declaration or many
53
#' * example(s) is last tag or not?

0 commit comments

Comments
 (0)