From 8000c60f8e1636a1fc61eaf8e5de95a8e8a0dc42 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Wed, 9 Sep 2026 11:58:50 -0700 Subject: [PATCH] Suppress new Pyrefly findings before upgrading to v1.2.0 PiperOrigin-RevId: 978674263 --- ffn/jax/input_pipeline.py | 4 ++-- ffn/utils/ortho_plane_visualization.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ffn/jax/input_pipeline.py b/ffn/jax/input_pipeline.py index 36e6173..c44aa69 100644 --- a/ffn/jax/input_pipeline.py +++ b/ffn/jax/input_pipeline.py @@ -270,7 +270,7 @@ def __init__( self._fs_lock = threading.Lock() self._fs = set() for i, gen in enumerate(self._generators): - self._fs.add(self._tpe.submit(lambda gen=gen, i=i: (i, next(gen)))) # pyrefly: ignore[missing-argument] + self._fs.add(self._tpe.submit(lambda gen=gen, i=i: (i, next(gen)))) # pyrefly: ignore[bad-argument-type, missing-argument] # Prefetching of complete batches. self._batch_tpe = futures.ThreadPoolExecutor(max_workers=batch_prefetch) @@ -378,7 +378,7 @@ def _update( for gen_idx in current: gen = self._generators[gen_idx] self._fs.add( - self._tpe.submit(lambda gen=gen, i=gen_idx: (i, next(gen))) # pyrefly: ignore[missing-argument] + self._tpe.submit(lambda gen=gen, i=gen_idx: (i, next(gen))) # pyrefly: ignore[bad-argument-type, missing-argument] ) # Distribute data asynchronously. diff --git a/ffn/utils/ortho_plane_visualization.py b/ffn/utils/ortho_plane_visualization.py index 2e75081..1a13d4a 100644 --- a/ffn/utils/ortho_plane_visualization.py +++ b/ffn/utils/ortho_plane_visualization.py @@ -49,7 +49,7 @@ def cut_ortho_planes( planes = [] full_slice = [slice(None)] * 3 - for axis, ix in enumerate(center): # pyrefly: ignore[bad-argument-type] + for axis, ix in enumerate(center): # pyrefly: ignore[bad-argument-type, not-iterable] cut_slice = list(full_slice) cut_slice[axis] = ix # pyrefly: ignore[unsupported-operation] planes.append(vol[tuple(cut_slice)]) @@ -57,7 +57,7 @@ def cut_ortho_planes( # Copy because cross hair is written into array data. plane = planes[-1].copy() i = 0 - for ax, c in enumerate(center): # pyrefly: ignore[bad-argument-type] + for ax, c in enumerate(center): # pyrefly: ignore[bad-argument-type, not-iterable] if ax != axis: # Make axis i the 0-axis an work in-place. view = np.rollaxis(plane, i)