resolve some new lint issues detected by newer version, and a few looked over ones

This commit is contained in:
protolambda 2019-06-01 02:40:29 +02:00
parent b79f01e2fa
commit fae1e9285d
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
5 changed files with 9 additions and 8 deletions

View File

@ -138,7 +138,7 @@ def test_wrong_deposit_for_deposit_count(state):
pubkey_1,
privkey_1,
spec.MAX_EFFECTIVE_BALANCE,
withdrawal_credentials=b'\x00'*32,
withdrawal_credentials=b'\x00' * 32,
signed=True,
)
deposit_count_1 = len(deposit_data_leaves)
@ -153,7 +153,7 @@ def test_wrong_deposit_for_deposit_count(state):
pubkey_2,
privkey_2,
spec.MAX_EFFECTIVE_BALANCE,
withdrawal_credentials=b'\x00'*32,
withdrawal_credentials=b'\x00' * 32,
signed=True,
)

View File

@ -1,4 +1,5 @@
from hashlib import sha256
def hash(x): return sha256(x).digest()
def hash(x):
return sha256(x).digest()

View File

@ -57,7 +57,7 @@ def serialize(obj, typ=None):
if is_basic_type(typ):
return serialize_basic(obj, typ)
elif is_list_kind(typ) or is_vector_kind(typ):
return encode_series(obj, [read_elem_type(typ)]*len(obj))
return encode_series(obj, [read_elem_type(typ)] * len(obj))
elif is_container_type(typ):
return encode_series(obj.get_field_values(), typ.get_field_types())
else: