From 7dfe92dfe9a9ac8598f12f53f1ab1225b5dd72d0 Mon Sep 17 00:00:00 2001 From: Grahame Bowland Date: Wed, 10 Aug 2016 01:30:03 +0800 Subject: [PATCH] fix election order callback --- dividebatur/counter.py | 11 ++++------- setup.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dividebatur/counter.py b/dividebatur/counter.py index 0312c1b..62b7250 100644 --- a/dividebatur/counter.py +++ b/dividebatur/counter.py @@ -239,23 +239,20 @@ def run(self): def resolve_election_order(self, candidate_permutations): """ - call the callback set with `set_election_order_callback`, - to break the tie. + call callback to break an election order tie. """ - return self.election_order_callback(candidate_permutations) + return self.election_order_cb(candidate_permutations) def resolve_exclusion_tie(self, candidates): """ - call the function (set with `set_candidate_tie_callback`) - to resolve a tie between candidates + call callback to resolve a tie between candidates """ sorted_candidate_ids = list(sorted(candidates, key=self.candidate_order_fn)) return sorted_candidate_ids[self.exclusion_tie_cb(candidates)] def resolve_election_tie(self, candidates): """ - call the function (set with `set_candidate_tie_callback`) - to resolve a tie between candidates + call callback to resolve a tie between candidates """ sorted_candidate_ids = list(sorted(candidates, key=self.candidate_order_fn)) return sorted_candidate_ids[self.election_tie_cb(candidates)] diff --git a/setup.py b/setup.py index 67526bd..857faf1 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ keywords="stv senate voting", url="https://github.com/grahame/dividebatur", name="dividebatur", - version="0.10.0", + version="0.10.1", packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), extras_require={ 'dev': dev_requires