Skip to content

Commit 1976817

Browse files
Merge pull request #1145 from r-lib/rc-1.10.2
Release {styler} v1.10.2
2 parents ca400ad + f6a311d commit 1976817

9 files changed

+51
-29
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: styler
33
Title: Non-Invasive Pretty Printing of R Code
4-
Version: 1.10.1
4+
Version: 1.10.2
55
Authors@R:
66
c(person(given = "Kirill",
77
family = "Müller",

NEWS.md

+20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
<!-- NEWS.md is maintained by https://cynkra.github.io/fledge, do not edit -->
2+
3+
# styler 1.10.2
4+
5+
This release was requested by the CRAN team to fix CRAN warning on invalid
6+
numeric version inputs (#1143).
7+
8+
**Minor changes**
9+
10+
* Use cli messaging for cache (#1127).
11+
* Use latest (and stable!) pre-commit (#1144).
12+
* Fix CRAN warning on invalid numeric version inputs (#1143).
13+
* Bump JamesIves/github-pages-deploy-action from 4.4.2 to 4.4.3 (#1139).
14+
* fix pre-commit (#1132).
15+
* Don't require dplyr anywhere (#1131).
16+
17+
We thank everyone who helped making this release possible.
18+
19+
[&#x0040;krlmlr](https://github.com/krlmlr), [&#x0040;lorenzwalthert](https://github.com/lorenzwalthert), [&#x0040;MichaelChirico](https://github.com/MichaelChirico), [&#x0040;olivroy](https://github.com/olivroy), [&#x0040;rkrug](https://github.com/rkrug), and [&#x0040;rossdrucker](https://github.com/rossdrucker).
20+
121
# styler 1.10.1
222

323
This release was requested by CRAN due to accidentally populating a user cache while building vignettes for R >= 4.3.0.

R/parse.R

-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ ensure_correct_txt <- function(pd, text) {
182182
#' changes from "all strings" to "all problematic strings", is partly
183183
#' misleading and this approach was chosen for performance reasons only.
184184
#' @param pd A parse table.
185-
#' @param text The initial code to style.
186185
#' @keywords internal
187186
is_insufficiently_parsed_string <- function(pd) {
188187
grepl("^\\[", pd$text) & pd$token == "STR_CONST"

R/rules-line-breaks.R

+11-11
Original file line numberDiff line numberDiff line change
@@ -268,21 +268,20 @@ set_line_break_after_assignment <- function(pd) {
268268

269269
#' Set line break for multi-line function calls
270270
#' @param pd A parse table.
271-
#' @param except_token_after A character vector with tokens after "'('" that do
272-
#' not cause a line break after "'('".
273-
#' @param except_text_before A character vector with text before "'('" that do
274-
#' not cause a line break after "'('".
275-
#' @param except_token_before A character vector with text before "')'" that do
276-
#' not cause a line break before "')'".
277-
#' @param force_text_before A character vector with text before "'('" that
278-
#' forces a line break after every argument in the call.
271+
#' @param except_token_before A character vector with tokens that do
272+
#' not cause a line break after them.
279273
#' @name set_line_break_if_call_is_multi_line
280274
#'
281275
#' @keywords internal
282276
NULL
283277

284278
#' Sets line break after opening parenthesis
285-
#'
279+
#' @param pd The parse table.
280+
#' @param except_token_after The tokens after the token that cause an exception.
281+
#' @param except_text_before A character vector with text before a token that
282+
#' does not cause a line break.
283+
#' @param force_text_before A character vector with text before "'('" that
284+
#' forces a line break after every argument in the call.
286285
#' @details
287286
#' In general, every call that is multi-line has a line break after the opening
288287
#' parenthesis. Exceptions:
@@ -341,7 +340,7 @@ set_line_break_after_opening_if_call_is_multi_line <- function(pd,
341340
#' position of the first named argument and breaks returns the index of it.
342341
#' If there is no named argument, the line is broken right after the opening
343342
#' parenthesis.
344-
#' @inheritParams set_line_break_if_call_is_multi_line
343+
#' @param pd A parse table.
345344
#' @keywords internal
346345
find_line_break_position_in_multiline_call <- function(pd) {
347346
candidate <- (which(pd$token == "EQ_SUB") - 1L)[1L]
@@ -377,7 +376,8 @@ set_line_break_before_closing_call <- function(pd, except_token_before) {
377376
}
378377

379378

380-
#' @rdname set_line_break_if_call_is_multi_line
379+
#' @describeIn set_line_break_if_call_is_multi_line Remove line breaks in
380+
#' function calls.
381381
#' @keywords internal
382382
remove_line_break_in_fun_call <- function(pd, strict) {
383383
if (is_function_call(pd)) {

cran-comments.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ editor_options:
44
wrap: 79
55
---
66

7-
This is a release requested by the CRAN team to delete the population of the
8-
user's cache while building vignettes.
7+
This is a release requested by the CRAN team to comply with
8+
`R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS`.
99

1010

1111
## Test environments

man/is_insufficiently_parsed_string.Rd

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/set_line_break_after_opening_if_call_is_multi_line.Rd

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/set_line_break_if_call_is_multi_line.Rd

+5-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/tests-cache-require-serial.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test_that("top-level test: Caches top-level expressions efficiently on style_tex
2525
partially_cached_benchmark["elapsed"] * 1.5,
2626
not_cached_benchmark["elapsed"]
2727
)
28-
expect_lt(full_cached_benchmark["elapsed"] * 35, benchmark["elapsed"])
28+
expect_lt(full_cached_benchmark["elapsed"] * 30, benchmark["elapsed"])
2929
})
3030

3131

0 commit comments

Comments
 (0)