Skip to content

Commit

Permalink
Fixes #99 . Standings via espn order for non-top half scoring
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcarls committed Sep 16, 2021
1 parent 65260b3 commit 10edbc7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ff_bot/ff_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,9 @@ def get_standings(league, top_half_scoring, week=None):
teams = league.teams
standings = []
if not top_half_scoring:
for t in teams:
standings.append((t.wins, t.losses, t.team_name))

standings = sorted(standings, key=lambda tup: tup[0], reverse=True)
standings_txt = [f"{pos + 1}: {team_name} ({wins} - {losses})" for \
pos, (wins, losses, team_name) in enumerate(standings)]
standings = league.standings()
standings_txt = [f"{pos + 1}: {team.team_name} ({team.wins} - {team.losses})" for \
pos, team in enumerate(standings)]
else:
top_half_totals = {t.team_name: 0 for t in teams}
if not week:
Expand Down

0 comments on commit 10edbc7

Please sign in to comment.