code-to10 v6 A14 batch2: test E402/F401 cleanup plus touched-file residual E,F cleanup

(cherry picked from commit 1db02545f74c96b3b92be4fc32954659cec1f814)

Reconcile-conflict: A14b E402 imports referencing cloud.handler_core (does not exist here; core methods live in server.py) — kept HEAD imports with incoming's noqa: E402 markers, dropped the unused core_mod import (verified unused elsewhere in both files).
This commit is contained in:
host committed 2026-11-04 21:03:33 +00:00
1 parent 7598574f81
commit e579e5131e
26 files changed
+51 -80

No files matched your search

+8 -6
View File
@@ -15,7 +15,7 @@ from unittest import mock
REPO_ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(REPO_ROOT))
from cloud.wait_ops import (
from cloud.wait_ops import ( # noqa: E402
_normalize_json_checks,
_row_dict,
build_pr_diagnostics,
@@ -189,10 +189,11 @@ class WaitCoresTestCase(unittest.TestCase):
self.assertEqual((task_id, kind), ("t1", "needs_continue"))
def test_poll_first_bad_timeout_immediate(self):
fetch = lambda: {"t1": {"status": "completed",
"pending_approvals": 0,
"pending_input": 0,
"pending_followups": 0}}
def fetch():
return {"t1": {"status": "completed",
"pending_approvals": 0,
"pending_input": 0,
"pending_followups": 0}}
changed, summaries, waited, timed_out = poll_for_first_change(
fetch, ["t1"], timeout_seconds="bad")
self.assertEqual(changed["kind"], "terminal")
@@ -204,7 +205,8 @@ class WaitCoresTestCase(unittest.TestCase):
{"t1": {"status": "completed", "pending_approvals": 0,
"pending_input": 0, "pending_followups": 0}}]
it = iter(seq)
fetch = lambda: next(it, seq[-1])
def fetch():
return next(it, seq[-1])
changed, summaries, waited, timed_out = poll_for_first_change(
fetch, ["t1"], timeout_seconds=5, poll_seconds=0.01)
self.assertEqual(changed["kind"], "terminal")