Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Change lists to generators

Tomas Valenta50e3958b2a84
diff --git a/api-service/codegen/tools/playground/tools/code.py b/api-service/codegen/tools/playground/tools/code.py
index e2f4973d3..8ed37b903 100644
--- a/api-service/codegen/tools/playground/tools/code.py
+++ b/api-service/codegen/tools/playground/tools/code.py
@@ -9,7 +9,7 @@ def extract_code(code: str):
def create_code_tools(playground: NodeJSPlayground):
# Ensure that the function is a generator even if no tools are yielded
- yield from []
+ yield from ()
@tool("InstallNPMDependencies")
def install_dependencies(dependencies: str) -> str:
diff --git a/api-service/codegen/tools/playground/tools/filesystem.py b/api-service/codegen/tools/playground/tools/filesystem.py
index 0bd1b8f64..2c415f7e7 100644
--- a/api-service/codegen/tools/playground/tools/filesystem.py
+++ b/api-service/codegen/tools/playground/tools/filesystem.py
@@ -11,7 +11,7 @@ def encode_directory_listing(entries: List[EntryInfo]) -> str:
def create_filesystem_tools(playground: NodeJSPlayground):
# Ensure that the function is a generator even if no tools are yielded
- yield from []
+ yield from ()
@tool("ReadFile")
def read_file(path: str) -> str:
diff --git a/api-service/codegen/tools/playground/tools/process.py b/api-service/codegen/tools/playground/tools/process.py
index 18cb8d771..8e5607bf0 100644
--- a/api-service/codegen/tools/playground/tools/process.py
+++ b/api-service/codegen/tools/playground/tools/process.py
@@ -27,7 +27,7 @@ def encode_command_output(response: RunProcessResponse, only_errors: bool = Fals
def create_process_tools(playground: NodeJSPlayground):
# Ensure that the function is a generator even if no tools are yielded
- yield from []
+ yield from ()
# TODO: Escape command?
@tool("RunTerminalCommand")