Skip to content

Commit 3b21141

Browse files
committed
Fix type hint
1 parent 3f2e3b4 commit 3b21141

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

eth/beacon/helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
Any,
77
Iterable,
88
Sequence,
9+
Tuple,
910
TYPE_CHECKING,
1011
)
1112

@@ -214,7 +215,7 @@ def get_attestation_indices(crystallized_state: 'CrystallizedState',
214215
yield from shard_and_committee.committee
215216

216217

217-
def get_active_validator_indices(validators: Sequence['ValidatorRecord']) -> Iterable[int]:
218+
def get_active_validator_indices(validators: Sequence['ValidatorRecord']) -> Tuple[int, ...]:
218219
"""
219220
Gets indices of active validators from ``validators``.
220221
"""

eth/beacon/utils/random.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Any,
44
Iterable,
55
Sequence,
6+
Tuple,
67
TypeVar,
78
)
89

@@ -85,7 +86,7 @@ def shuffle(values: Sequence[Any],
8586
return output
8687

8788

88-
def split(values: Sequence[TItem], split_count: int) -> Iterable[Any]:
89+
def split(values: Sequence[TItem], split_count: int) -> Tuple[Any, ...]:
8990
"""
9091
Returns the split ``values`` in ``split_count`` pieces in protocol.
9192
Spec: https://github.com/ethereum/eth2.0-specs/blob/70cef14a08de70e7bd0455d75cf380eb69694bfb/specs/core/0_beacon-chain.md#helper-functions # noqa: E501

0 commit comments

Comments
 (0)