Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
cdonnay committed Nov 16, 2023
1 parent 6921dbe commit 370e497
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/votekit/elections/election_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,12 @@ def run_step(self, step: Optional[Union[int, None]] = None) -> ElectionState:
self.run_step()

while self.state.curr_round > step:
self.state = self.state.previous
if self.state.previous:
self.state = self.state.previous
else:
raise ValueError("Previous state is None type.")

return(self.state)
return(self.state)

# run next step
else:
Expand Down

0 comments on commit 370e497

Please sign in to comment.