From 841209a6300560c405765b6ced30e2c4a99dfbea Mon Sep 17 00:00:00 2001 From: stroblme Date: Fri, 28 Aug 2026 13:40:16 +0200 Subject: [PATCH] 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) Claude-Session: https://claude.ai/code/session_01K1moruzue2kTJd3uVisgNk --- backend/fluksio/flow/controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/fluksio/flow/controller.py b/backend/fluksio/flow/controller.py index e05d8d9..1ffce99 100644 --- a/backend/fluksio/flow/controller.py +++ b/backend/fluksio/flow/controller.py @@ -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,