chore: ruff check --fix && ruff format .

This commit is contained in:
LIghtJUNction
2026-04-10 20:12:33 +08:00
parent 7a23c264a3
commit 18e66595f0
209 changed files with 2721 additions and 1070 deletions

View File

@@ -46,7 +46,9 @@ async def handle_result(result: dict, event: AstrMessageEvent) -> ToolExecResult
for img in images:
resp.content.append(
mcp.types.ImageContent(
type="image", data=img["image/png"], mimeType="image/png",
type="image",
data=img["image/png"],
mimeType="image/png",
),
)
@@ -68,7 +70,10 @@ class PythonTool(FunctionTool):
parameters: dict = field(default_factory=lambda: param_schema)
async def call( # type: ignore[override]
self, context: ContextWrapper[AstrAgentContext], code: str, silent: bool = False,
self,
context: ContextWrapper[AstrAgentContext],
code: str,
silent: bool = False,
) -> ToolExecResult:
if permission_error := check_admin_permission(context, "Python execution"):
return permission_error
@@ -94,7 +99,10 @@ class LocalPythonTool(FunctionTool):
parameters: dict = field(default_factory=lambda: param_schema)
async def call( # type: ignore[override]
self, context: ContextWrapper[AstrAgentContext], code: str, silent: bool = False,
self,
context: ContextWrapper[AstrAgentContext],
code: str,
silent: bool = False,
) -> ToolExecResult:
if permission_error := check_admin_permission(context, "Python execution"):
return permission_error