jontingvold / pyrankvote

PyRankVote is a python library for different ranked-choice voting systems, like IRV, STV and PBV. Created in June 2019.
MIT License
52 stars 16 forks source link

Problem in ElectionManager #18

Open mbaugher opened 2 years ago

mbaugher commented 2 years ago

Hi, ElectionManager's repr method references non-existent variables and crashes when used - AFAICT. Here's a change that I made. Two changes, actually, but the first fixes something that is a typo - AFAICT.

diff --git a/pyrankvote/helpers.py b/pyrankvote/helpers.py index 5155e41..09c32f7 100644 --- a/pyrankvote/helpers.py +++ b/pyrankvote/helpers.py @@ -98,7 +98,7 @@ class ElectionManager:

 ElectionManager is initialized by giving it the list of candidates and ballots,
 and configure settings like number of votes each person has (used in preferential block voting)

@@ -162,7 +162,7 @@ class ElectionManager: self._sort_candidates_in_race()

 def __repr__(self) -> str: