Cosmetic improvements
This commit is contained in:
parent
b3e03c2f7b
commit
fa18641462
@ -91,7 +91,7 @@ class STVCCounter:
|
||||
if len(has_surplus) > 0:
|
||||
# Distribute surpluses in order of size
|
||||
has_surplus.sort(lambda x: x[1].votes, True)
|
||||
candidate, count_card = has_surplus[0]
|
||||
candidate_surplus, count_card = has_surplus[0]
|
||||
count_card.state = CandidateState.ELECTED
|
||||
|
||||
__pragma__('opov')
|
||||
@ -119,7 +119,7 @@ class STVCCounter:
|
||||
self.elect_meeting_quota()
|
||||
|
||||
return CountStepResult(
|
||||
'Surplus',
|
||||
'Surplus of ' + candidate_surplus.name,
|
||||
self.candidates,
|
||||
self.exhausted,
|
||||
self.quota
|
||||
@ -131,7 +131,7 @@ class STVCCounter:
|
||||
hopefuls.sort(lambda x: x[1].votes)
|
||||
|
||||
# TODO: Handle ties
|
||||
candidate, count_card = hopefuls[0]
|
||||
candidate_excluded, count_card = hopefuls[0]
|
||||
count_card.state = CandidateState.EXCLUDED
|
||||
__pragma__('opov')
|
||||
count_card.transfers -= count_card.votes
|
||||
@ -155,7 +155,7 @@ class STVCCounter:
|
||||
self.elect_meeting_quota()
|
||||
|
||||
return CountStepResult(
|
||||
'Exclusion',
|
||||
'Exclusion of ' + candidate_excluded.name,
|
||||
self.candidates,
|
||||
self.exhausted,
|
||||
self.quota
|
||||
|
Reference in New Issue
Block a user