Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chex/_src/asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +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))):
expected_shapes = [expected_shapes] * len(inputs)
expected_shapes = [expected_shapes] * len(inputs) # pyrefly: ignore[bad-argument-type, bad-assignment]
# pyrefly: ignore[bad-argument-type, bad-assignment]
if len(inputs) != len(expected_shapes): # pyrefly: ignore[bad-argument-type]
raise AssertionError(
Expand Down Expand Up @@ -755,7 +755,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)):
expected_ranks = [expected_ranks] * len(inputs)
expected_ranks = [expected_ranks] * len(inputs) # pyrefly: ignore[bad-argument-type]
# pyrefly: ignore[bad-argument-type]
if len(inputs) != len(expected_ranks): # pyrefly: ignore[bad-argument-type]
raise AssertionError(
Expand Down
Loading