Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix possible type inconsistency
Tomas Valenta3bd742678092
diff --git a/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py b/packages/python-sdk/e2b/sandbox/filesystem/filesystem.pyindex 41d1d81c3..8188f144b 100644--- a/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py+++ b/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py@@ -1,5 +1,6 @@from enum import Enumfrom dataclasses import dataclass+from typing import Optionalfrom e2b.envd.filesystem import filesystem_pb2@@ -19,5 +20,5 @@ def map_file_type(ft: filesystem_pb2.FileType):@dataclassclass EntryInfo:name: str- type: FileType+ type: Optional[FileType]path: strdiff --git a/packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.py b/packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.pyindex 981827e87..7fa1dc5cc 100644--- a/packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.py+++ b/packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.py@@ -212,7 +212,12 @@ class Filesystem:),headers=authentication_header(user),)- return r.entry++ return EntryInfo(+ name=r.entry.name,+ type=map_file_type(r.entry.type),+ path=r.entry.path,+ )except Exception as e:raise handle_rpc_exception(e)