Skip to content

Commit 1dabf46

Browse files
Bhargavasomucburgdorf
authored andcommitted
Enable complete type hinting for eth.beacon
1 parent ae1e3e4 commit 1dabf46

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

eth/beacon/state_machines/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __init__(self, chaindb: BaseBeaconChainDB, block: BaseBeaconBlock=None) -> N
9595
# Logging
9696
#
9797
@property
98-
def logger(self):
98+
def logger(self) -> logging.Logger:
9999
return logging.getLogger('eth.beacon.state_machines.base.BeaconStateMachine.{0}'.format(
100100
self.__class__.__name__
101101
))

eth/beacon/state_machines/forks/serenity/crystallized_states.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
class SerenityCrystallizedState(CrystallizedState):
55
@classmethod
6-
def from_crystallized_state(cls, crystallized_state):
6+
def from_crystallized_state(cls,
7+
crystallized_state: CrystallizedState
8+
) -> "SerenityCrystallizedState":
79
return cls(
810
validators=crystallized_state.validators,
911
last_state_recalc=crystallized_state.last_state_recalc,

eth/beacon/types/crystallized_states.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,5 @@ def num_validators(self) -> int:
117117
return len(self.validators)
118118

119119
@property
120-
def num_crosslink_records(self):
120+
def num_crosslink_records(self) -> int:
121121
return len(self.crosslink_records)

0 commit comments

Comments
 (0)