From 4b7d42c2a34e69b86337253907a4172841ed754b Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Tue, 17 Mar 2026 16:53:45 +0800 Subject: [PATCH] chore: ruff format --- astrbot/core/agent/handoff.py | 1 - astrbot/core/computer/tools/shell.py | 4 +++- astrbot/core/utils/requirements_utils.py | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/astrbot/core/agent/handoff.py b/astrbot/core/agent/handoff.py index 0363e2d55..aebcdcb5d 100644 --- a/astrbot/core/agent/handoff.py +++ b/astrbot/core/agent/handoff.py @@ -15,7 +15,6 @@ class HandoffTool(FunctionTool, Generic[TContext]): tool_description: str | None = None, **kwargs, ) -> None: - # Avoid passing duplicate `description` to the FunctionTool dataclass. # Some call sites (e.g. SubAgentOrchestrator) pass `description` via kwargs # to override what the main agent sees, while we also compute a default diff --git a/astrbot/core/computer/tools/shell.py b/astrbot/core/computer/tools/shell.py index 251a67f36..d9fb25e7d 100644 --- a/astrbot/core/computer/tools/shell.py +++ b/astrbot/core/computer/tools/shell.py @@ -62,7 +62,9 @@ class ExecuteShellTool(FunctionTool): umo=context.context.event.unified_msg_origin ) try: - timeout = int(config.get("provider_settings", {}).get("tool_call_timeout", 30)) + timeout = int( + config.get("provider_settings", {}).get("tool_call_timeout", 30) + ) except (ValueError, TypeError): timeout = 30 result = await sb.shell.exec( diff --git a/astrbot/core/utils/requirements_utils.py b/astrbot/core/utils/requirements_utils.py index e031de846..f2c749db1 100644 --- a/astrbot/core/utils/requirements_utils.py +++ b/astrbot/core/utils/requirements_utils.py @@ -394,7 +394,6 @@ def find_missing_requirements(requirements_path: str) -> set[str] | None: def find_missing_requirements_from_lines( requirement_lines: Sequence[str], ) -> set[str] | None: - required = list(iter_requirements(lines=requirement_lines)) if not required: return set()