lint: ruff-clean testbed (blocking file write to thread, unused vars)

This commit is contained in:
opencode
2026-08-08 04:29:51 +03:00
parent 132eb25c62
commit 4ced623b55
8 changed files with 42 additions and 19 deletions
+7 -3
View File
@@ -417,7 +417,7 @@ async def run_scripted_agent(
detour_turns += 1
t = (await client.call_tool("turn", {"yaw_deg": 45.0})).output
summary["tool_calls"] += 1
log("tool", f'turn({{"yaw_deg": 45.0}}) [detour]')
log("tool", 'turn({"yaw_deg": 45.0}) [detour]')
log("bridge", f"ok {json.dumps(t)}")
else:
detour_steps -= 1
@@ -516,8 +516,12 @@ async def run_demo(args: argparse.Namespace) -> dict[str, Any]:
frame = (await client.call_tool("vision", {})).output
if args.frame:
raw = base64.b64decode(frame["png_b64"])
with open(args.frame, "wb") as fh:
fh.write(raw)
def _write_frame() -> None:
with open(args.frame, "wb") as fh:
fh.write(raw)
await asyncio.to_thread(_write_frame)
print(f"\n[final frame saved] {args.frame}")
print(
f"\n[demo done] steps={summary['steps']} tool_calls={summary['tool_calls']} "