diff --git a/vision_agent/utils/execute.py b/vision_agent/utils/execute.py index 15e4f9b9..05b03612 100644 --- a/vision_agent/utils/execute.py +++ b/vision_agent/utils/execute.py @@ -410,7 +410,9 @@ def upload_file(self, file: Union[str, Path]) -> Path: # Default behavior is a no-op (for local code interpreter) return Path(file) - def download_file(self, remote_file_path: Union[str, Path], local_file_path: Union[str, Path]) -> Path: + def download_file( + self, remote_file_path: Union[str, Path], local_file_path: Union[str, Path] + ) -> Path: # Default behavior is a no-op (for local code interpreter) return Path(local_file_path) @@ -528,9 +530,13 @@ def upload_file(self, file: Union[str, Path]) -> Path: _LOGGER.info(f"File ({file}) is uploaded to: {str(self.remote_path)}") return self.remote_path - def download_file(self, remote_file_path: Union[str, Path], local_file_path: Union[str, Path]) -> Path: + def download_file( + self, remote_file_path: Union[str, Path], local_file_path: Union[str, Path] + ) -> Path: with open(local_file_path, "w+b") as f: - f.write(self.interpreter.files.read(path=str(remote_file_path), format="bytes")) + f.write( + self.interpreter.files.read(path=str(remote_file_path), format="bytes") + ) _LOGGER.info(f"File ({remote_file_path}) is downloaded to: {local_file_path}") return Path(local_file_path) @@ -625,7 +631,9 @@ def upload_file(self, file_path: Union[str, Path]) -> Path: return Path(self.remote_path / file_path) - def download_file(self, remote_file_path: Union[str, Path], local_file_path: Union[str, Path]) -> Path: + def download_file( + self, remote_file_path: Union[str, Path], local_file_path: Union[str, Path] + ) -> Path: with open(self.remote_path / remote_file_path, "rb") as f: contents = f.read() with open(local_file_path, "wb") as f: