Answer prose round 1: 0 🔴, 2 🟡; reword the votes and surplus docstrings and rename two tests

This commit is contained in:
2026-10-22 02:21:46 +02:00
parent e32accd08c
commit 4b783ac67b
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ VOTES = ("better", "same", "worse")
def votes(seats: list[Seat]) -> dict[str, list[str]] | Failure:
"""Each seat's five votes as written, in DIMENSIONS' order, once the seats, their lines and their places have the shape a votes file takes; what the votes count as is `counted`'s to say."""
"""Each seat's five votes as written, in DIMENSIONS' order. Fails unless the seats come in a votes file's order and each seat's vote line and places have its shape. `counted` decides what the votes count as."""
names = [seat.name for seat in seats]
if names[:2] != list(FIRST_SEATS) or names[2:] not in ([], list(SPLIT_SEATS)):
return Failure(f"a paired ruling's seats are {' and '.join(FIRST_SEATS)}, then, when their overall votes differ, {' and '.join(SPLIT_SEATS)}, in that order; the file has {', '.join(names) or 'none'}")
@@ -36,7 +36,7 @@ def names_a_place(seat: Seat, dimension: str) -> bool:
def surplus(overall: list[str]) -> bool:
"""Whether seats beyond the first two voted though those two agree, which settles the ruling alone."""
"""Whether seats beyond the first two voted, though the first two agree overall: their agreement settles the ruling by itself."""
return len(overall) > 2 and overall[0] == overall[1]