Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions chex/_src/asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions chex/_src/restrict_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)

Expand Down
Loading