From 886cda66546de3cf47bbb114c81808fd3aeddcbe Mon Sep 17 00:00:00 2001 From: iliya Date: Fri, 20 Feb 2026 13:21:52 +0100 Subject: [PATCH] Fix REPL file detection for pandas export methods Added missing file-writing keywords to the REPL mode file detection list. Previously, files created with pandas to_excel() and other export methods were not captured because the keyword list only included: open(), savefig, to_csv, write(), .save(). Added: to_excel, to_json, to_parquet, to_html, to_xml, to_feather, to_pickle, dump() (for json.dump, pickle.dump, yaml.dump). This fix ensures generated files are properly detected and returned in the API response when using REPL mode (Python only). --- src/services/execution/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/execution/runner.py b/src/services/execution/runner.py index 31d601a..393b9cf 100644 --- a/src/services/execution/runner.py +++ b/src/services/execution/runner.py @@ -221,7 +221,7 @@ async def execute( or files or any( kw in request.code - for kw in ["open(", "savefig", "to_csv", "write(", ".save("] + for kw in ["open(", "savefig", "to_csv", "to_excel", "to_json", "to_parquet", "to_html", "to_xml", "to_feather", "to_pickle", "write(", ".save(", "dump("] ) )