Skip to content

Commit 23d9057

Browse files
committed
Merge branch '211_subset@main' of https://github.com/insightsengineering/teal.code into 211_subset@main
2 parents da9a69b + 3e4582e commit 23d9057

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

R/qenv-get_warnings.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ setMethod("get_warnings", signature = c("qenv"), function(object) {
3737
idx_warn <- which(sapply(warnings, Negate(is.null)))
3838
warnings <- warnings[idx_warn]
3939
code <- object@code[idx_warn]
40-
if (length(unlist(warnings)) == 0) {
40+
if (length(warnings) == 0) {
4141
return(NULL)
4242
}
4343

tests/testthat/test-qenv_get_code.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,6 @@ testthat::test_that("detects cooccurrence properly even if all objects are on lh
635635
# @ ---------------------------------------------------------------------------------------------------------------
636636

637637
testthat::test_that("understands @ usage and do not treat rhs of @ as objects (only lhs)", {
638-
639638
code <- c(
640639
"setClass('aclass', slots = c(a = 'numeric', x = 'numeric', y = 'numeric')) # @linksto a x",
641640
"x <- new('aclass', a = 1:3, x = 1:3, y = 1:3)",
@@ -650,13 +649,13 @@ testthat::test_that("understands @ usage and do not treat rhs of @ as objects (o
650649
dependency <-
651650
lapply(
652651
code_split,
653-
function(current_code){
652+
function(current_code) {
654653
parsed_code <- parse(text = current_code, keep.source = TRUE)
655654
extract_dependency(parsed_code)
656655
}
657656
)
658657

659-
for(i in seq_along(code_split)){
658+
for (i in seq_along(code_split)) {
660659
attr(code_split[[i]], "dependency") <- dependency[[i]]
661660
}
662661

0 commit comments

Comments
 (0)