diff --git a/R/knitr-engine.R b/R/knitr-engine.R index c7fd3c62..8c2983e6 100644 --- a/R/knitr-engine.R +++ b/R/knitr-engine.R @@ -198,7 +198,6 @@ eng_python <- function(options) { # Stash some options. is_hold <- identical(options$results, "hold") is_hidden <- identical(options$results, "hide") - is_include <- isTRUE(options$include) jupyter_compat <- isTRUE(options$jupyter_compat) # line index from which source should be emitted @@ -306,8 +305,8 @@ eng_python <- function(options) { outputs$push(output) } - # append captured outputs (respecting 'include' option) - if (!is_hidden && is_include) { + # append captured outputs (respecting 'results = "hide"' option) + if (!is_hidden) { # append captured output if (!identical(captured, "")) outputs_target$push(captured) @@ -349,7 +348,7 @@ eng_python <- function(options) { plt$show() } - if (!is_hidden && is_include) { + if (!is_hidden) { for (plot in .engine_context$pending_plots$data()) outputs_target$push(plot) .engine_context$pending_plots$clear()