From f6400a4d5f647a534bd923e879ead8a270fa8d96 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl <alexfikl@gmail.com> Date: Fri, 29 Oct 2021 17:49:38 -0500 Subject: [PATCH] remove __mro__ check in is_array_container_type --- arraycontext/container/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arraycontext/container/__init__.py b/arraycontext/container/__init__.py index ca13935..55deb90 100644 --- a/arraycontext/container/__init__.py +++ b/arraycontext/container/__init__.py @@ -173,9 +173,7 @@ def is_array_container_type(cls: type) -> bool: function will say that :class:`numpy.ndarray` is an array container type, only object arrays *actually are* array containers. """ - assert isinstance(cls, type), \ - f"must pass a type, not an instance: '{cls!r}'" - assert hasattr(cls, "__mro__"), "'cls' has no attribute '__mro__': " + assert isinstance(cls, type), f"must pass a {type!r}, not a '{cls!r}'" return ( cls is ArrayContainer -- GitLab