Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Add types

Jakub Novak7b1b6f940d42
diff --git a/packages/python-sdk/e2b/sandbox/main.py b/packages/python-sdk/e2b/sandbox/main.py
index 9de3f2355..203d15b96 100644
--- a/packages/python-sdk/e2b/sandbox/main.py
+++ b/packages/python-sdk/e2b/sandbox/main.py
@@ -112,7 +112,7 @@ class Sandbox(SandboxConnection):
)
self._actions: Dict[str, Action] = {}
- def add_action(self, action: "Action", name: Optional[str] = None):
+ def add_action(self, action: "Action", name: Optional[str] = None) -> "Sandbox":
"""
Add a new action. If the name is not specified, it is automatically extracted from the function name.
An action is a function that takes a sandbox and a dictionary of arguments and returns a string.
@@ -139,7 +139,7 @@ class Sandbox(SandboxConnection):
return self
- def remove_action(self, name: str):
+ def remove_action(self, name: str) -> "Sandbox":
"""
Remove an action.