Skip to content

Commit f5d9bc3

Browse files
Merge branch 'main' into f209-newline-multiline-args
2 parents 80292c0 + dcc91b2 commit f5d9bc3

File tree

7 files changed

+13
-5
lines changed

7 files changed

+13
-5
lines changed

.github/workflows/pkgdown.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Deploy to GitHub pages 🚀
4141
if: github.event_name != 'pull_request'
42-
uses: JamesIves/github-pages-deploy-action@v4.7.2
42+
uses: JamesIves/github-pages-deploy-action@v4.7.3
4343
with:
4444
clean: false
4545
branch: gh-pages

.github/workflows/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fetch-depth: 0
2828

2929
- name: Set up Python
30-
uses: actions/setup-python@v5.4.0
30+
uses: actions/setup-python@v5.5.0
3131
with:
3232
python-version: "3.13"
3333

.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: v0.4.3.9003
9+
rev: v0.4.3.9008
1010
hooks:
1111
- id: style-files
1212
args:

R/rules-line-breaks.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ set_line_break_after_opening_if_call_is_multi_line <- function(pd,
310310
if (!is_function_call(pd) && !is_subset_expr(pd)) {
311311
return(pd)
312312
}
313-
has_force_text_before <- last(pd$child[[1L]]$text) %in% force_text_before
313+
idx <- length(pd$child[[1L]]$text)
314+
has_force_text_before <-
315+
pd$child[[1L]]$text[idx] %in% force_text_before && pd$child[[1L]]$token[idx] == "SYMBOL_FUNCTION_CALL"
314316
if (has_force_text_before) {
315317
break_pos <- c(
316318
which(lag(pd$token %in% c("','", "COMMENT"))),

R/utils-cache.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ cache_is_activated <- function(cache_name = NULL) {
137137
return(cache_name == current_cache)
138138
}
139139

140-
return(FALSE)
140+
FALSE
141141
}
142142

143143
#' Cache text

tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-in.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,6 @@ dplyr::ifelse(
7373
x,
7474
1, 32
7575
)
76+
77+
# variable name 'switch' is different
78+
l$switch[1:3, ]

tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-out.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@ dplyr::ifelse(
7575
x,
7676
1, 32
7777
)
78+
79+
# variable name 'switch' is different
80+
l$switch[1:3, ]

0 commit comments

Comments
 (0)