Linter fixes

This commit is contained in:
Dankrad Feist 2019-06-27 15:21:04 +01:00
parent b574a58109
commit 8ed638bb84
No known key found for this signature in database
GPG Key ID: 6815E6A20BEBBABA
3 changed files with 5 additions and 3 deletions

View File

@ -9,7 +9,7 @@ def test_decoder():
rng = Random(123)
# check these types only, Block covers a lot of operation types already.
# TODO: Once has Bitfields and Bitvectors, add back
# TODO: Once has Bitfields and Bitvectors, add back
# spec.BeaconState and spec.BeaconBlock
for typ in [spec.IndexedAttestation, spec.AttestationDataAndCustodyBit]:
# create a random pyspec value

View File

@ -311,7 +311,8 @@ def test_empty_aggregation_bitfield(spec, state):
attestation = get_valid_attestation(spec, state)
state.slot += spec.MIN_ATTESTATION_INCLUSION_DELAY
attestation.aggregation_bitfield = Bitlist[spec.MAX_INDICES_PER_ATTESTATION](*([0] * len(attestation.aggregation_bitfield)))
attestation.aggregation_bitfield = Bitlist[spec.MAX_INDICES_PER_ATTESTATION](
*([0b0] * len(attestation.aggregation_bitfield)))
sign_attestation(spec, state, attestation)

View File

@ -364,11 +364,12 @@ class Bitvector(BaseBitfield):
@classmethod
def is_fixed_size(cls):
return True
@classmethod
def default(cls):
return cls(0 for _ in range(cls.length))
class List(BaseList):
@classmethod