diff --git a/bin/larv_review/record.py b/bin/larv_review/record.py index 935d4439..5dcf9314 100644 --- a/bin/larv_review/record.py +++ b/bin/larv_review/record.py @@ -6,11 +6,11 @@ from comprehension_history import appended, DIMENSIONS, FLOOR, heading, Heading, from git_repo import commit_exists, top from larv_review.ruling import counted, overall, ruling, split, surplus, votes from failure import Failure +from larv_review.seats import FIRST_SEATS, scores, seats_file, SeatsFile from larv_review.scoring import means, under_floor from larv_review.plan import plan_reasons import rank_todo from file_writes import replace_file -from larv_review.seats import FIRST_SEATS, scores, seats_file, SeatsFile def record_ruling(votes_file: pathlib.Path) -> Failure | None: @@ -22,10 +22,10 @@ def record_ruling(votes_file: pathlib.Path) -> Failure | None: if isinstance(written, Failure): return written counts = counted(seats_read.seats, written) - tally = ", ".join(f"{seat.name} {vote_text(DIMENSIONS[-1], overall(written[seat.name]), overall(counts[seat.name]))}" for seat in seats_read.seats) overall_votes = [overall(each) for each in counts.values()] if surplus(overall_votes): return Failure(f"{' and '.join(FIRST_SEATS)} both count as {overall_votes[0]} overall, which settles the ruling; drop the other seats' lines") + tally = ", ".join(f"{seat.name} {vote_text(DIMENSIONS[-1], overall(written[seat.name]), overall(counts[seat.name]))}" for seat in seats_read.seats) if split(overall_votes): print(f"Split: {tally}. Launch the maintainability senior and Junior A together, add their lines to the votes file, and run this again.") return None