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
chore: apply and fix flake8-bugbear lint rules (#4496)
Bowen Liange8e213ad1e3d
diff --git a/api/core/model_runtime/callbacks/base_callback.py b/api/core/model_runtime/callbacks/base_callback.pyindex 51af9786fd2..bba004a32a2 100644--- a/api/core/model_runtime/callbacks/base_callback.py+++ b/api/core/model_runtime/callbacks/base_callback.py@@ -1,4 +1,3 @@-from abc import ABCfrom typing import Optionalfrom 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.diff --git a/api/core/tools/tool_manager.py b/api/core/tools/tool_manager.pyindex dd28055932a..d5440875940 100644--- a/api/core/tools/tool_manager.py+++ b/api/core/tools/tool_manager.py@@ -361,7 +361,6 @@ class ToolManager::return: the label of the tool"""- cls._builtin_tools_labelsif len(cls._builtin_tools_labels) == 0:# init the builtin providerscls.load_builtin_providers_cache()diff --git a/api/core/workflow/nodes/tool/tool_node.py b/api/core/workflow/nodes/tool/tool_node.pyindex d183dbe17b2..a08e25db9e9 100644--- a/api/core/workflow/nodes/tool/tool_node.py+++ b/api/core/workflow/nodes/tool/tool_node.py@@ -39,7 +39,6 @@ class ToolNode(BaseNode):parameters = self._generate_parameters(variable_pool, node_data)# get tool runtimetry:- self.app_idtool_runtime = ToolManager.get_workflow_tool_runtime(self.tenant_id, self.app_id, self.node_id, node_data)except Exception as e:return NodeRunResult(diff --git a/api/pyproject.toml b/api/pyproject.tomlindex 59a2b3fcf48..070195b48ae 100644--- a/api/pyproject.toml+++ b/api/pyproject.toml@@ -9,9 +9,9 @@ line-length = 120[tool.ruff.lint]ignore-init-module-imports = trueselect = [+ "B", # flake8-bugbear rules"F", # pyflakes rules- "I001", # unsorted-imports- "I002", # missing-required-import+ "I", # isort rules"UP", # pyupgrade rules"RUF019", # unnecessary-key-check]@@ -22,6 +22,12 @@ ignore = ["F841", # unused-variable"UP007", # non-pep604-annotation"UP032", # f-string+ "B005", # strip-with-multi-characters+ "B006", # mutable-argument-default+ "B007", # unused-loop-control-variable+ "B026", # star-arg-unpacking-after-keyword-arg+ "B904", # raise-without-from-inside-except+ "B905", # zip-without-explicit-strict][tool.ruff.lint.per-file-ignores]