diff --git a/DESCRIPTION b/DESCRIPTION
index ebd01913c..7a54a3604 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -68,8 +68,7 @@ Imports:
mlr3 (>= 0.20.0),
mlr3misc (>= 0.17.0),
paradox (>= 1.0.0),
- R6,
- withr
+ R6
Suggests:
ggplot2,
glmnet,
diff --git a/NAMESPACE b/NAMESPACE
index db5044844..7d18e1f4f 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -240,4 +240,3 @@ importFrom(stats,setNames)
importFrom(utils,bibentry)
importFrom(utils,head)
importFrom(utils,tail)
-importFrom(withr,with_options)
diff --git a/R/Graph.R b/R/Graph.R
index a358fa33b..98407c498 100644
--- a/R/Graph.R
+++ b/R/Graph.R
@@ -205,13 +205,13 @@ Graph = R6Class("Graph",
assert_choice(src_id, names(self$pipeops))
assert_choice(dst_id, names(self$pipeops))
if (is.null(src_channel)) {
- if (length(self$pipeops[[src_id]]$output$name) > 1) {
+ if (length(self$pipeops[[src_id]]$output$name) > 1L) {
stopf("src_channel must not be NULL if src_id pipeop has more than one output channel.")
}
src_channel = 1L
}
if (is.null(dst_channel)) {
- if (length(self$pipeops[[dst_id]]$input$name) > 1) {
+ if (length(self$pipeops[[dst_id]]$input$name) > 1L) {
stopf("dst_channel must not be NULL if dst_id pipeop has more than one input channel.")
}
dst_channel = 1L
@@ -225,7 +225,7 @@ Graph = R6Class("Graph",
src_channel = self$pipeops[[src_id]]$output$name[src_channel]
}
assert(
- check_integerish(dst_channel, lower = 1,
+ check_integerish(dst_channel, lower = 1L,
upper = nrow(self$pipeops[[dst_id]]$input), any.missing = FALSE),
check_choice(dst_channel, self$pipeops[[dst_id]]$input$name)
)
@@ -283,7 +283,7 @@ Graph = R6Class("Graph",
df = self$edges[, list(from = src_id, to = dst_id)]
df = rbind(df, self$input[, list(from = "", to = op.id)])
output = self$output
- if (nrow(output) > 1) {
+ if (nrow(output) > 1L) {
# In case we have multiple outputs, we add an output for every final node
df = rbind(df, output[, list(from = op.id, to = paste0("