From 37895d03ca02cb47bcce84af52e8832e2fe79942 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Fri, 15 Jan 2021 18:24:06 +1100 Subject: [PATCH] Fix --hide-excluded on CLI --- pyRCV2/cli/stv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyRCV2/cli/stv.py b/pyRCV2/cli/stv.py index 7021a18..24c24ad 100644 --- a/pyRCV2/cli/stv.py +++ b/pyRCV2/cli/stv.py @@ -80,7 +80,7 @@ def print_step(args, stage, result): if state is None: print('- {}: {} ({})'.format(candidate.name, ppVotes, ppTransfers)) else: - if not (args.hide_excluded and state == 'Excluded' and float(ppVotes) == 0 and float(ppTransfers) == 0): + if not (args.hide_excluded and (count_card.state == pyRCV2.model.CandidateState.EXCLUDED or count_card.state == pyRCV2.model.CandidateState.EXCLUDING) and float(ppVotes) == 0 and float(ppTransfers) == 0): print('- {}: {} ({}) - {}'.format(candidate.name, ppVotes, ppTransfers, state)) print('Exhausted: {} ({})'.format(result.exhausted.votes.pp(args.pp_decimals), result.exhausted.transfers.pp(args.pp_decimals)))