fix(types): T5 — narrow AsyncClient|None with inline if; rename loop variable t→task to avoid no-redef

This commit is contained in:
2026-05-01 01:53:10 -04:00
parent d187304e99
commit f6e67c036d
7 changed files with 17 additions and 17 deletions

View File

@@ -105,11 +105,11 @@ async def run_campaign_clusterer_loop(
t.cancel()
if heartbeat_task is not None:
heartbeat_task.cancel()
for t in (*wake_tasks, heartbeat_task):
if t is None:
for task in (*wake_tasks, heartbeat_task):
if task is None:
continue
with contextlib.suppress(asyncio.CancelledError, Exception):
await t
await task
if bus is not None:
with contextlib.suppress(Exception):
await bus.close()