style: apply ruff formatting
All checks were successful
CI / Lint (push) Successful in 6s
CI / Test (push) Successful in 7s
CI / Build & Push (push) Successful in 18s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-29 18:41:10 -04:00
parent 47a8c34215
commit bf39bb6bd5
2 changed files with 10 additions and 4 deletions

View File

@@ -52,7 +52,9 @@ def parse_games(scoreboard_data):
"Intermission": game["clock"]["inIntermission"] "Intermission": game["clock"]["inIntermission"]
if game_state == "LIVE" if game_state == "LIVE"
else "N/A", else "N/A",
"Priority": calculate_game_priority(game) + get_comeback_bonus(game) + calculate_game_importance(game), "Priority": calculate_game_priority(game)
+ get_comeback_bonus(game)
+ calculate_game_importance(game),
"Start Time": get_start_time(game), "Start Time": get_start_time(game),
"Home Record": format_record(game["homeTeam"]["record"]) "Home Record": format_record(game["homeTeam"]["record"])
if game["gameState"] in ["PRE", "FUT"] if game["gameState"] in ["PRE", "FUT"]
@@ -336,10 +338,12 @@ def calculate_game_importance(game):
season_weight = 0.05 season_weight = 0.05
else: else:
t = (avg_gp - 30) / (82 - 30) t = (avg_gp - 30) / (82 - 30)
season_weight = min(t ** 1.8, 1.0) season_weight = min(t**1.8, 1.0)
# Playoff relevance — peaks for bubble teams (wildcard rank ~17-19) # Playoff relevance — peaks for bubble teams (wildcard rank ~17-19)
best_wc = min(home_st["wildcard_sequence"] or 32, away_st["wildcard_sequence"] or 32) best_wc = min(
home_st["wildcard_sequence"] or 32, away_st["wildcard_sequence"] or 32
)
if best_wc <= 12: if best_wc <= 12:
playoff_relevance = 0.60 playoff_relevance = 0.60
elif best_wc <= 16: elif best_wc <= 16:

View File

@@ -293,7 +293,9 @@ class TestMigrateStandingsTable:
migrate_standings_table(conn) migrate_standings_table(conn)
cols = [row[1] for row in conn.execute("PRAGMA table_info(standings)").fetchall()] cols = [
row[1] for row in conn.execute("PRAGMA table_info(standings)").fetchall()
]
assert "division_abbrev" in cols assert "division_abbrev" in cols
assert "conference_abbrev" in cols assert "conference_abbrev" in cols
assert "games_played" in cols assert "games_played" in cols