Tell mypy what the closure already knows about placer and pool

Both calls sit in a closure where a narrowing of `Placer | None` and
`PythonWorkerPool | None` will not carry across the function boundary. The
`remote.run_on` line below them already carried the same ignore; these two
close out `make lint-backend`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1moruzue2kTJd3uVisgNk
This commit is contained in:
2026-08-28 13:40:16 +02:00
co-authored by Claude Opus 5
parent 45348d2e0a
commit 841209a630
+2 -2
View File
@@ -916,12 +916,12 @@ class FlowController:
placer, pool = self.placer, self.workers placer, pool = self.placer, self.workers
def call(**kwargs: Any) -> Any: def call(**kwargs: Any) -> Any:
with placer.claim( with placer.claim( # type: ignore[union-attr]
wanted, device=device, policy=policy, node=node_id, run=run_id wanted, device=device, policy=policy, node=node_id, run=run_id
) as (target, allocation): ) as (target, allocation):
env = derive_env(wanted, allocation) env = derive_env(wanted, allocation)
if target.worker is None: if target.worker is None:
return pool.for_env(env).run( return pool.for_env(env).run( # type: ignore[union-attr]
owner, owner,
local, local,
code, code,