Skip to content

Commit

Permalink
change to issubclass, hope parametrized external type is ok
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Jun 5, 2019
1 parent a7554d5 commit 1cc7c73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py
Expand Up @@ -249,7 +249,7 @@ def __init__(self, *args: Iterable):
# cannot check non-type objects
if isinstance(cls.elem_type, type):
for i, item in enumerate(self.items):
if not isinstance(item, cls.elem_type):
if not issubclass(type(item), cls.elem_type):
raise TypeError("Typed vector cannot hold differently typed value"
" at index %d. Got type: %s, expected type: %s" % (i, type(item), cls.elem_type))

Expand Down

0 comments on commit 1cc7c73

Please sign in to comment.