Skip to content

Commit f6400a4

Browse files
alexfiklinducer
authored andcommitted
remove __mro__ check in is_array_container_type
1 parent 1f8709c commit f6400a4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arraycontext/container/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,7 @@ def is_array_container_type(cls: type) -> bool:
173173
function will say that :class:`numpy.ndarray` is an array container
174174
type, only object arrays *actually are* array containers.
175175
"""
176-
assert isinstance(cls, type), \
177-
f"must pass a type, not an instance: '{cls!r}'"
178-
assert hasattr(cls, "__mro__"), "'cls' has no attribute '__mro__': "
176+
assert isinstance(cls, type), f"must pass a {type!r}, not a '{cls!r}'"
179177

180178
return (
181179
cls is ArrayContainer

0 commit comments

Comments
 (0)