Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: add type annotations to BaseStorage.exists and BaseStorage.download (#32652)

edvatar2eefb585f9c1
diff --git a/api/extensions/storage/base_storage.py b/api/extensions/storage/base_storage.py
index b987c7d253f..a73d429ccd2 100644
--- a/api/extensions/storage/base_storage.py
+++ b/api/extensions/storage/base_storage.py
@@ -20,11 +20,11 @@ class BaseStorage(ABC):
raise NotImplementedError
@abstractmethod
- def download(self, filename, target_filepath):
+ def download(self, filename: str, target_filepath: str) -> None:
raise NotImplementedError
@abstractmethod
- def exists(self, filename):
+ def exists(self, filename: str) -> bool:
raise NotImplementedError
@abstractmethod