Apply suggestions from code review

Co-Authored-By: Diederik Loerakker <proto@protolambda.com>
This commit is contained in:
Hsiao-Wei Wang 2019-07-13 12:29:08 +08:00
parent f229d21faa
commit b08ecb018a
No known key found for this signature in database
GPG Key ID: 95B070122902DEA4
1 changed files with 0 additions and 3 deletions

View File

@ -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