remove bare list, dict, Sequence, None, Any (#25058)
Some checks are pending
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Waiting to run
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Waiting to run
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Blocked by required conditions
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Blocked by required conditions
Main CI Pipeline / Check Changed Files (push) Waiting to run
Main CI Pipeline / API Tests (push) Blocked by required conditions
Main CI Pipeline / Web Tests (push) Blocked by required conditions
Main CI Pipeline / Style Check (push) Waiting to run
Main CI Pipeline / VDB Tests (push) Blocked by required conditions
Main CI Pipeline / DB Migration Test (push) Blocked by required conditions

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
Asuka Minato
2025-09-06 04:32:23 +09:00
committed by GitHub
parent 2b0695bdde
commit a78339a040
306 changed files with 787 additions and 817 deletions

View File

@@ -17,7 +17,7 @@ class PluginAgentClient(BasePluginClient):
Fetch agent providers for the given tenant.
"""
def transformer(json_response: dict[str, Any]) -> dict:
def transformer(json_response: dict[str, Any]):
for provider in json_response.get("data", []):
declaration = provider.get("declaration", {}) or {}
provider_name = declaration.get("identity", {}).get("name")
@@ -49,7 +49,7 @@ class PluginAgentClient(BasePluginClient):
"""
agent_provider_id = GenericProviderID(provider)
def transformer(json_response: dict[str, Any]) -> dict:
def transformer(json_response: dict[str, Any]):
# skip if error occurs
if json_response.get("data") is None or json_response.get("data", {}).get("declaration") is None:
return json_response

View File

@@ -8,7 +8,7 @@ from extensions.ext_logging import get_request_id
class PluginDaemonError(Exception):
"""Base class for all plugin daemon errors."""
def __init__(self, description: str) -> None:
def __init__(self, description: str):
self.description = description
def __str__(self) -> str:

View File

@@ -415,7 +415,7 @@ class PluginModelClient(BasePluginClient):
model: str,
credentials: dict,
language: Optional[str] = None,
) -> list[dict]:
):
"""
Get tts model voices
"""

View File

@@ -16,7 +16,7 @@ class PluginToolManager(BasePluginClient):
Fetch tool providers for the given tenant.
"""
def transformer(json_response: dict[str, Any]) -> dict:
def transformer(json_response: dict[str, Any]):
for provider in json_response.get("data", []):
declaration = provider.get("declaration", {}) or {}
provider_name = declaration.get("identity", {}).get("name")
@@ -48,7 +48,7 @@ class PluginToolManager(BasePluginClient):
"""
tool_provider_id = ToolProviderID(provider)
def transformer(json_response: dict[str, Any]) -> dict:
def transformer(json_response: dict[str, Any]):
data = json_response.get("data")
if data:
for tool in data.get("declaration", {}).get("tools", []):