fix linting + mypy

This commit is contained in:
protolambda 2019-06-19 01:03:04 +02:00
parent 4b4bf87e47
commit 5be0c57aad
5 changed files with 28 additions and 20 deletions

View File

@ -20,8 +20,8 @@ from eth2spec.utils.ssz.ssz_impl import (
signing_root,
)
from eth2spec.utils.ssz.ssz_typing import (
# unused: uint8, uint16, uint32, uint128, uint256,
Bit, Container, List, Vector, Bytes, BytesN, uint64
Bit, Container, List, Vector, Bytes, uint64,
Bytes4, Bytes32, Bytes48, Bytes96,
)
from eth2spec.utils.bls import (
bls_aggregate_pubkeys,
@ -45,7 +45,7 @@ from eth2spec.utils.ssz.ssz_impl import (
is_empty,
)
from eth2spec.utils.ssz.ssz_typing import (
Bit, Container, List, Vector, Bytes, BytesN, uint64,
Bit, Container, List, Vector, Bytes, uint64,
Bytes4, Bytes32, Bytes48, Bytes96,
)
from eth2spec.utils.bls import (

View File

@ -1,7 +1,7 @@
from ..merkle_minimal import merkleize_chunks
from ..hash_function import hash
from .ssz_typing import (
SSZValue, SSZType, BasicValue, BasicType, Series, ElementsType, Elements, Bit, Container, List, Vector, Bytes, BytesN, uint
SSZValue, SSZType, BasicValue, BasicType, Series, Elements, Bit, Container, List, Bytes, BytesN, uint
)
# SSZ Serialization

View File

@ -400,3 +400,10 @@ class BytesN(BytesLike):
@classmethod
def is_fixed_size(cls):
return True
# Helpers for common BytesN types.
Bytes4 = BytesN[4]
Bytes32 = BytesN[32]
Bytes48 = BytesN[48]
Bytes96 = BytesN[96]

View File

@ -1,7 +1,7 @@
from .ssz_impl import serialize, serialize_basic, encode_series, signing_root, hash_tree_root
from .ssz_impl import serialize, hash_tree_root
from .ssz_typing import (
SSZValue, SSZType, BasicValue, BasicType, Series, ElementsType, Bit, Container, List, Vector, Bytes, BytesN,
uint, uint8, uint16, uint32, uint64, uint128, uint256, byte
Bit, Container, List, Vector, Bytes, BytesN,
uint8, uint16, uint32, uint64, byte
)
import pytest

View File

@ -1,5 +1,6 @@
from .ssz_typing import (
SSZValue, SSZType, BasicValue, BasicType, Series, ElementsType, Elements, Bit, Container, List, Vector, Bytes, BytesN,
SSZValue, SSZType, BasicValue, BasicType, Series, ElementsType,
Elements, Bit, Container, List, Vector, Bytes, BytesN,
uint, uint8, uint16, uint32, uint64, uint128, uint256
)