Skip to content

Commit eef41bd

Browse files
oprypincopybara-github
authored andcommitted
Suppress new Pyrefly findings before upgrading to v1.2.0
PiperOrigin-RevId: 978603323
1 parent 8c7fcb6 commit eef41bd

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

ffn/jax/input_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def __init__(
270270
self._fs_lock = threading.Lock()
271271
self._fs = set()
272272
for i, gen in enumerate(self._generators):
273-
self._fs.add(self._tpe.submit(lambda gen=gen, i=i: (i, next(gen)))) # pyrefly: ignore[missing-argument]
273+
self._fs.add(self._tpe.submit(lambda gen=gen, i=i: (i, next(gen)))) # pyrefly: ignore[bad-argument-type, missing-argument]
274274

275275
# Prefetching of complete batches.
276276
self._batch_tpe = futures.ThreadPoolExecutor(max_workers=batch_prefetch)
@@ -378,7 +378,7 @@ def _update(
378378
for gen_idx in current:
379379
gen = self._generators[gen_idx]
380380
self._fs.add(
381-
self._tpe.submit(lambda gen=gen, i=gen_idx: (i, next(gen))) # pyrefly: ignore[missing-argument]
381+
self._tpe.submit(lambda gen=gen, i=gen_idx: (i, next(gen))) # pyrefly: ignore[bad-argument-type, missing-argument]
382382
)
383383

384384
# Distribute data asynchronously.

ffn/utils/ortho_plane_visualization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ def cut_ortho_planes(
4949

5050
planes = []
5151
full_slice = [slice(None)] * 3
52-
for axis, ix in enumerate(center): # pyrefly: ignore[bad-argument-type]
52+
for axis, ix in enumerate(center): # pyrefly: ignore[bad-argument-type, not-iterable]
5353
cut_slice = list(full_slice)
5454
cut_slice[axis] = ix # pyrefly: ignore[unsupported-operation]
5555
planes.append(vol[tuple(cut_slice)])
5656
if cross_hair:
5757
# Copy because cross hair is written into array data.
5858
plane = planes[-1].copy()
5959
i = 0
60-
for ax, c in enumerate(center): # pyrefly: ignore[bad-argument-type]
60+
for ax, c in enumerate(center): # pyrefly: ignore[bad-argument-type, not-iterable]
6161
if ax != axis:
6262
# Make axis i the 0-axis an work in-place.
6363
view = np.rollaxis(plane, i)

0 commit comments

Comments
 (0)