From 3a437d240643e072f8b15aa7cafdd280b23befcc Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Thu, 10 Sep 2026 05:06:51 -0700 Subject: [PATCH] Suppress new Pyrefly findings before upgrading to v1.2.0 PiperOrigin-RevId: 979118755 --- chex/_src/asserts.py | 2 ++ chex/_src/restrict_backends.py | 1 + 2 files changed, 3 insertions(+) diff --git a/chex/_src/asserts.py b/chex/_src/asserts.py index 0e114e0..76707c7 100644 --- a/chex/_src/asserts.py +++ b/chex/_src/asserts.py @@ -655,7 +655,9 @@ def assert_shape( # pyrefly: ignore[bad-argument-type] for idx, (x, expected) in enumerate(zip(inputs, expected_shapes)): shape = getattr(x, "shape", ()) # scalars have shape () by definition. + # pyrefly: ignore[bad-argument-type] if not _shape_matches(shape, expected): + # pyrefly: ignore[bad-argument-type] errors.append((idx, shape, _ai.format_shape_matcher(expected))) if errors: diff --git a/chex/_src/restrict_backends.py b/chex/_src/restrict_backends.py index 19937d7..1671f23 100644 --- a/chex/_src/restrict_backends.py +++ b/chex/_src/restrict_backends.py @@ -95,6 +95,7 @@ def is_allowed(backend_platform): return ( (backend_platform in allowed) if allowed is not None + # pyrefly: ignore[not-iterable] else (backend_platform not in forbidden) )