diff --git a/voting/cli/voting.py b/voting/cli/voting.py index 5416a0d..2d077ff 100644 --- a/voting/cli/voting.py +++ b/voting/cli/voting.py @@ -1,6 +1,7 @@ import typer from arrow import get as arrow_get +from rich import print from voting import Quorum, QuorumKind, Result, Voting, Vote from voting.storage import Storage diff --git a/voting/voting.py b/voting/voting.py index 7598341..fc7db01 100644 --- a/voting/voting.py +++ b/voting/voting.py @@ -98,8 +98,12 @@ class Result: out = [] if self.voting.quorum.kind != QuorumKind.NONE: out.append(f"QUORUM: {self.voting.quorum.value}{'%' if self.voting.quorum.kind == QuorumKind.PERCENT else ''}") - out.append(f"GESAMT: {len(self.voting.votes)} => DAFUER: {votes[Vote.JA.name]} DAGEGEN: {votes[Vote.NEIN.name]} ENTHALTUNGEN: {votes[Vote.ENTHALTUNG.name]}") - out.append(f"ERGEBNIS: {self.outcome()}") + out.append(f"GESAMTZAHL DER STIMMEN: {len(self.voting.votes)}/{len(self.voting.voters)}") + out.append(f"=> DAFUER: {votes[Vote.JA.name]}") + out.append(f"=> DAGEGEN: {votes[Vote.NEIN.name]}") + out.append(f"=> ENTHALTUNGEN: {votes[Vote.ENTHALTUNG.name]}") + out.append(f"=> ANTRAG: {self.outcome()}") + out.append(f"NICHT TEILGENOMMEN: {', '.join([v for v in self.voting.voters if v not in self.voting.votes])}") return '\n'.join(out) @abc.abstractmethod