Skip to content

Commit ba8f0d2

Browse files
committed
Fix R plot handling by passing additional arguments to .original_print_trellis and update test to ignore plots return value.
1 parent c570ec6 commit ba8f0d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llm_sandbox/language_handlers/artifact_detection/r_plot_detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
.plot_counter <<- .plot_counter + 1
195195
png_file <- sprintf('/tmp/sandbox_plots/%06d.png', .plot_counter)
196196
png(png_file, width = 800, height = 600, res = 100)
197-
.original_print_trellis(x)
197+
.original_print_trellis(x, ...)
198198
dev.off()
199199
}, error = function(e) {
200200
cat("lattice capture error:", e$message, "\n")

tests/test_r_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_run_with_artifacts_with_plotting(self) -> None:
6060
# Mock the extract_plots method
6161
handler.extract_plots = MagicMock(return_value=[])
6262

63-
result, plots = handler.run_with_artifacts(
63+
result, _ = handler.run_with_artifacts(
6464
container=mock_container, code="plot(1:10)", libraries=["ggplot2"], enable_plotting=True
6565
)
6666

0 commit comments

Comments
 (0)