Skip to content

Commit 463bb58

Browse files
committed
Merge commit 'fc4e4940f21f63a6bbe55a01ee11f9800c99af73'
2 parents 7a12f4d + fc4e494 commit 463bb58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+688
-343
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
^LICENSE\.md$
2222
^\.github$
2323
^CRAN-SUBMISSION$
24+
^[.]?air[.]toml$
25+
^\.vscode$

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"Posit.air-vscode"
4+
]
5+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"[r]": {
3+
"editor.formatOnSave": true,
4+
"editor.defaultFormatter": "Posit.air-vscode"
5+
},
6+
"[quarto]": {
7+
"editor.formatOnSave": true,
8+
"editor.defaultFormatter": "quarto.quarto"
9+
}
10+
}

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: stringr
22
Title: Simple, Consistent Wrappers for Common String Operations
3-
Version: 1.5.1.9000
3+
Version: 1.5.2.9000
44
Authors@R: c(
55
person("Hadley", "Wickham", , "[email protected]", role = c("aut", "cre", "cph")),
66
person("Posit Software, PBC", role = c("cph", "fnd"))
@@ -41,4 +41,4 @@ Config/testthat/edition: 3
4141
Encoding: UTF-8
4242
LazyData: true
4343
Roxygen: list(markdown = TRUE)
44-
RoxygenNote: 7.3.2
44+
RoxygenNote: 7.3.3

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
a single vector. This radically improves performance at the cost of breaking
1515
some existing uses (#462).
1616

17+
# stringr 1.5.2
18+
19+
* `R CMD check` fixes
20+
1721
# stringr 1.5.1
1822

1923
* Some minor documentation improvements.

R/case.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ str_to_lower <- function(string, locale = "en") {
3939
#' @rdname case
4040
str_to_title <- function(string, locale = "en") {
4141
check_string(locale)
42-
out <- stri_trans_totitle(string,
43-
opts_brkiter = stri_opts_brkiter(locale = locale))
42+
out <- stri_trans_totitle(
43+
string,
44+
opts_brkiter = stri_opts_brkiter(locale = locale)
45+
)
4446
copy_names(string, out)
4547
}
4648
#' @export

R/compat-obj-type.R

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
# - Added documentation.
3838
# - Added changelog.
3939

40-
4140
#' Return English-friendly type
4241
#' @param x Any R object.
4342
#' @param value Whether to describe the value of `x`. Special values
@@ -73,12 +72,11 @@ obj_type_friendly <- function(x, value = TRUE) {
7372
typeof(x),
7473
logical = "`NA`",
7574
integer = "an integer `NA`",
76-
double =
77-
if (is.nan(x)) {
78-
"`NaN`"
79-
} else {
80-
"a numeric `NA`"
81-
},
75+
double = if (is.nan(x)) {
76+
"`NaN`"
77+
} else {
78+
"a numeric `NA`"
79+
},
8280
complex = "a complex `NA`",
8381
character = "a character `NA`",
8482
.rlang_stop_unexpected_typeof(x)
@@ -280,14 +278,16 @@ obj_type_oo <- function(x) {
280278
#' @param ... Arguments passed to [abort()].
281279
#' @inheritParams args_error_context
282280
#' @noRd
283-
stop_input_type <- function(x,
284-
what,
285-
...,
286-
allow_na = FALSE,
287-
allow_null = FALSE,
288-
show_value = TRUE,
289-
arg = caller_arg(x),
290-
call = caller_env()) {
281+
stop_input_type <- function(
282+
x,
283+
what,
284+
...,
285+
allow_na = FALSE,
286+
allow_null = FALSE,
287+
show_value = TRUE,
288+
arg = caller_arg(x),
289+
call = caller_env()
290+
) {
291291
# From compat-cli.R
292292
cli <- env_get_list(
293293
nms = c("format_arg", "format_code"),

R/compat-purrr.R

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,16 @@ args_recycle <- function(args) {
9090
}
9191
pmap <- function(.l, .f, ...) {
9292
args <- args_recycle(.l)
93-
do.call("mapply", c(
94-
FUN = list(quote(.f)),
95-
args, MoreArgs = quote(list(...)),
96-
SIMPLIFY = FALSE, USE.NAMES = FALSE
97-
))
93+
do.call(
94+
"mapply",
95+
c(
96+
FUN = list(quote(.f)),
97+
args,
98+
MoreArgs = quote(list(...)),
99+
SIMPLIFY = FALSE,
100+
USE.NAMES = FALSE
101+
)
102+
)
98103
}
99104

100105
probe <- function(.x, .p, ...) {
@@ -200,5 +205,4 @@ vec_index <- function(x) {
200205
names(x) %||% seq_along(x)
201206
}
202207

203-
204208
# nocov end

0 commit comments

Comments
 (0)