diff --git a/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py b/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py index 4944fb600..368041f90 100644 --- a/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py +++ b/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py @@ -246,8 +246,8 @@ class Vector(metaclass=VectorMeta): self.items = list(args) - # cannot check non-type objects - if isinstance(cls.elem_type, type): + # cannot check non-type objects, or parametrized types + if isinstance(cls.elem_type, type) and not hasattr(cls.elem_type, '__args__'): for i, item in enumerate(self.items): if not issubclass(type(item), cls.elem_type): raise TypeError("Typed vector cannot hold differently typed value"