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) )