From d46c25c00e6232f9c93a9f42e897a7e8d9c796bb Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Wed, 4 Nov 2026 00:00:58 +0800 Subject: [PATCH] fix(tests): restore Lark recovery fixture lint Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- tests/test_lark_private_conversations.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_lark_private_conversations.py b/tests/test_lark_private_conversations.py index e637574c0b..5c4a7a0d04 100644 --- a/tests/test_lark_private_conversations.py +++ b/tests/test_lark_private_conversations.py @@ -814,7 +814,7 @@ def crash(**kwargs): @pytest.mark.parametrize("fault", [None, "codex-fallback", "quota-restore", "quota-unchanged", "quota-unknown", "stop", "new-input", "no-anchor", "changed-proof", "unknown-outer", "wrong-target", "changed-brief", "tool-step", "cleared-before-proof", "retention-io"]) -def test_completed_invalid_metadata_uses_one_original_format_review(tmp_path, language_server, monkeypatch, fault): +def test_completed_invalid_metadata_uses_one_original_format_review(tmp_path, language_server, monkeypatch, fault): # noqa: F811 - imported pytest fixture """An already delivered, historical answer must not be sent/executed twice.""" from copy import deepcopy from datetime import timezone @@ -925,8 +925,9 @@ def changed(**kwargs): monkeypatch.setattr(runtime, "capabilities", lambda: capabilities) allocation = manager_executor_allocation(runtime, environ={}, endpoint_capabilities=[ {**item, "available": item["agent_id"] == "codex"} for item in capabilities]) - route = lambda *args: {"allocation": allocation, "blocked_primary": None, - "observed_at": time.time()} + def route(*args): + return {"allocation": allocation, "blocked_primary": None, + "observed_at": time.time()} monkeypatch.setattr(manager_module, "manager_session_quota_route", route) monkeypatch.setattr(runtime_module, "manager_session_quota_route", route) class Formatter(CodexAppServerAdapter):