1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

trezor.crypto.rlp: add type annotations

This commit is contained in:
Pavol Rusnak 2016-11-18 19:05:40 +01:00
parent ddd46f6f53
commit 88e46ca66f
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -7,7 +7,7 @@ def to_binary(x: int):
x //= 256 x //= 256
return bytes(reversed(r)) return bytes(reversed(r))
def encode_length(l, offset): def encode_length(l: int, offset: int):
if l < 56: if l < 56:
return bytes([l + offset]) return bytes([l + offset])
elif l < 256 ** 8: elif l < 256 ** 8: