From b4942e3e3cee9f4c87f3404d6b165ec375f59f70 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 22 Jul 2026 01:48:11 -0700 Subject: [PATCH] Suppress pyrefly errors PiperOrigin-RevId: 951964007 --- chex/_src/asserts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chex/_src/asserts.py b/chex/_src/asserts.py index 3ab07e7..0e114e0 100644 --- a/chex/_src/asserts.py +++ b/chex/_src/asserts.py @@ -642,6 +642,7 @@ def assert_shape( # Shapes are always lists or tuples, not scalars. if (not expected_shapes or not isinstance(expected_shapes[0], (list, tuple))): + # pyrefly: ignore[bad-argument-type, bad-assignment] expected_shapes = [expected_shapes] * len(inputs) # pyrefly: ignore[bad-argument-type, bad-assignment] if len(inputs) != len(expected_shapes): # pyrefly: ignore[bad-argument-type] @@ -755,6 +756,7 @@ def assert_rank( inputs = [inputs] # pyrefly: ignore[bad-assignment] if (not isinstance(expected_ranks, collections.abc.Sequence) or isinstance(expected_ranks, collections.abc.Set)): + # pyrefly: ignore[bad-argument-type] expected_ranks = [expected_ranks] * len(inputs) # pyrefly: ignore[bad-argument-type] if len(inputs) != len(expected_ranks): # pyrefly: ignore[bad-argument-type]