mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-24 18:23:07 +08:00
chore: apply and fix flake8-bugbear lint rules (#4496)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from abc import ABC
|
||||
from typing import Optional
|
||||
|
||||
from core.model_runtime.entities.llm_entities import LLMResult, LLMResultChunk
|
||||
@@ -14,7 +13,7 @@ _TEXT_COLOR_MAPPING = {
|
||||
}
|
||||
|
||||
|
||||
class Callback(ABC):
|
||||
class Callback:
|
||||
"""
|
||||
Base class for callbacks.
|
||||
Only for LLM.
|
||||
|
||||
@@ -361,7 +361,6 @@ class ToolManager:
|
||||
|
||||
:return: the label of the tool
|
||||
"""
|
||||
cls._builtin_tools_labels
|
||||
if len(cls._builtin_tools_labels) == 0:
|
||||
# init the builtin providers
|
||||
cls.load_builtin_providers_cache()
|
||||
|
||||
@@ -39,7 +39,6 @@ class ToolNode(BaseNode):
|
||||
parameters = self._generate_parameters(variable_pool, node_data)
|
||||
# get tool runtime
|
||||
try:
|
||||
self.app_id
|
||||
tool_runtime = ToolManager.get_workflow_tool_runtime(self.tenant_id, self.app_id, self.node_id, node_data)
|
||||
except Exception as e:
|
||||
return NodeRunResult(
|
||||
|
||||
Reference in New Issue
Block a user