From e7085154daae49ef741d58f554010a7fc33d044f Mon Sep 17 00:00:00 2001 From: aran-yogesh Date: Tue, 10 Feb 2026 17:38:32 -0800 Subject: [PATCH] refactor:langsmith.py changes --- apps/agent/agent/integrations/langsmith.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/agent/agent/integrations/langsmith.py b/apps/agent/agent/integrations/langsmith.py index 29df7ddf..7e90e11c 100644 --- a/apps/agent/agent/integrations/langsmith.py +++ b/apps/agent/agent/integrations/langsmith.py @@ -20,8 +20,7 @@ from deepagents.backends.protocol import ( ) from deepagents.backends.sandbox import BaseSandbox -if TYPE_CHECKING: - from langsmith.sandbox import Sandbox, SandboxClient, SandboxTemplate +from langsmith.sandbox import Sandbox, SandboxClient, SandboxTemplate class SandboxProvider(ABC): @@ -101,7 +100,9 @@ class LangSmithBackend(BaseSandbox): responses: list[FileDownloadResponse] = [] for path in paths: content = self._sandbox.read(path) - responses.append(FileDownloadResponse(path=path, content=content, error=None)) + responses.append( + FileDownloadResponse(path=path, content=content, error=None) + ) return responses def upload_files(self, files: list[tuple[str, bytes]]) -> list[FileUploadResponse]: @@ -160,7 +161,10 @@ class LangSmithProvider(SandboxProvider): template_name=resolved_template_name, timeout=timeout ) except Exception as e: - msg = f"Failed to create sandbox from template '{resolved_template_name}': {e}" + msg = ( + f"Failed to create sandbox from template " + f"'{resolved_template_name}': {e}" + ) raise RuntimeError(msg) from e # Verify sandbox is ready by polling