Apply suggestions from code review
Co-Authored-By: Diederik Loerakker <proto@protolambda.com>
This commit is contained in:
parent
f229d21faa
commit
b08ecb018a
|
@ -18,13 +18,10 @@ def translate_typ(typ) -> ssz.BaseSedes:
|
||||||
elif issubclass(typ, spec_ssz.Vector):
|
elif issubclass(typ, spec_ssz.Vector):
|
||||||
return ssz.Vector(translate_typ(typ.elem_type), typ.length)
|
return ssz.Vector(translate_typ(typ.elem_type), typ.length)
|
||||||
elif issubclass(typ, spec_ssz.List):
|
elif issubclass(typ, spec_ssz.List):
|
||||||
# TODO: Make py-ssz List support the new fixed length list
|
|
||||||
return ssz.List(translate_typ(typ.elem_type), typ.length)
|
return ssz.List(translate_typ(typ.elem_type), typ.length)
|
||||||
elif issubclass(typ, spec_ssz.Bitlist):
|
elif issubclass(typ, spec_ssz.Bitlist):
|
||||||
# TODO: Once Bitlist implemented in py-ssz, use appropriate type
|
|
||||||
return ssz.Bitlist(typ.length)
|
return ssz.Bitlist(typ.length)
|
||||||
elif issubclass(typ, spec_ssz.Bitvector):
|
elif issubclass(typ, spec_ssz.Bitvector):
|
||||||
# TODO: Once Bitvector implemented in py-ssz, use appropriate type
|
|
||||||
return ssz.Bitvector(typ.length)
|
return ssz.Bitvector(typ.length)
|
||||||
elif issubclass(typ, spec_ssz.boolean):
|
elif issubclass(typ, spec_ssz.boolean):
|
||||||
return ssz.boolean
|
return ssz.boolean
|
||||||
|
|
Loading…
Reference in New Issue