mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-31 03:39:04 +08:00
specify a sorting key for sorting nested lists in ba module
sorting with objects that Python cannot compare
This commit is contained in:
parent
bb39357a70
commit
b13df59274
@ -189,7 +189,7 @@ class TeamGameResults:
|
||||
sval.append(team)
|
||||
results: List[Tuple[Optional[int],
|
||||
List[ba.Team]]] = list(winners.items())
|
||||
results.sort(reverse=not self._lower_is_better)
|
||||
results.sort(reverse=not self._lower_is_better, key=lambda x: x[0])
|
||||
|
||||
# Also group the 'None' scores.
|
||||
none_teams: List[ba.Team] = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user