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.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: mypy checks violation in AzureBlobStorage (#13215)
Bowen Liang9e1457c2c31b
diff --git a/api/extensions/storage/azure_blob_storage.py b/api/extensions/storage/azure_blob_storage.pyindex eff7743cc29..7448fd4a6bb 100644--- a/api/extensions/storage/azure_blob_storage.py+++ b/api/extensions/storage/azure_blob_storage.py@@ -1,7 +1,8 @@from collections.abc import Generatorfrom datetime import UTC, datetime, timedelta+from typing import Optional-from azure.identity import DefaultAzureCredential+from azure.identity import ChainedTokenCredential, DefaultAzureCredentialfrom azure.storage.blob import AccountSasPermissions, BlobServiceClient, ResourceTypes, generate_account_sasfrom configs import dify_config@@ -19,6 +20,7 @@ class AzureBlobStorage(BaseStorage):self.account_name = dify_config.AZURE_BLOB_ACCOUNT_NAMEself.account_key = dify_config.AZURE_BLOB_ACCOUNT_KEY+ self.credential: Optional[ChainedTokenCredential] = Noneif self.account_key == "managedidentity":self.credential = DefaultAzureCredential()else:@@ -64,7 +66,7 @@ class AzureBlobStorage(BaseStorage):def _sync_client(self):if self.account_key == "managedidentity":- return BlobServiceClient(account_url=self.account_url, credential=self.credential)+ return BlobServiceClient(account_url=self.account_url, credential=self.credential) # type: ignorecache_key = "azure_blob_sas_token_{}_{}".format(self.account_name, self.account_key)cache_result = redis_client.get(cache_key)