ruff check --fix --select ALL

This commit is contained in:
LIghtJUNction
2026-04-10 19:57:02 +08:00
parent 33f54aaec6
commit ec1af1ac0f
281 changed files with 3308 additions and 3164 deletions

View File

@@ -46,8 +46,8 @@ 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",
),
)
if event.get_platform_name() == "webchat":
@@ -68,7 +68,7 @@ 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 +94,7 @@ 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