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`.
This commit is contained in:
2026-08-28 13:40:16 +02:00
parent 562b5bbff3
commit 532f65da7b
+2 -2
View File
@@ -916,12 +916,12 @@ class FlowController:
placer, pool = self.placer, self.workers
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
) as (target, allocation):
env = derive_env(wanted, allocation)
if target.worker is None:
return pool.for_env(env).run(
return pool.for_env(env).run( # type: ignore[union-attr]
owner,
local,
code,