Skip to content

Commit

Permalink
Merge pull request #35 from tomasz-was/main
Browse files Browse the repository at this point in the history
choose-1 profile parsing
  • Loading branch information
Simon-Rey authored Feb 4, 2025
2 parents eef8a9b + b5cde89 commit 6eabd33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pabutools/election/pabulib.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def parse_pabulib_from_string(file_content: str) -> tuple[Instance, Profile]:
if row[i].strip().lower() != "none":
ballot_meta[header[i].strip()] = row[i].strip()
vote_type = instance.meta["vote_type"]
if vote_type == "approval":
if vote_type in ["approval", "choose-1"]:
ballot = ApprovalBallot()
for project_name in ballot_meta["vote"].split(","):
if project_name:
Expand Down Expand Up @@ -169,7 +169,7 @@ def parse_pabulib_from_string(file_content: str) -> tuple[Instance, Profile]:
legal_max_score = None

profile = None
if instance.meta["vote_type"] == "approval":
if instance.meta["vote_type"] in ["approval", "choose-1"]:
profile = ApprovalProfile(
deepcopy(ballots),
legal_min_length=legal_min_length,
Expand Down

0 comments on commit 6eabd33

Please sign in to comment.