Removing duplicate logic for week override

This commit is contained in:
Carlos 2024-09-26 00:04:32 -07:00
parent 23cb006f23
commit 8877ebee47

7
app.py
View file

@ -23,11 +23,8 @@ def extract_positional_data(lineup: list, position: str) -> int:
return response
def extract_matchup_box_scores(league: League, week_override: int = None) -> dict:
week_to_process = league.current_week
if week_override:
week_to_process = week_override
matchups = league.box_scores(week=week_to_process)
def extract_matchup_box_scores(league: League, week_override: int) -> dict:
matchups = league.box_scores(week=week_override)
result = []
for matchup in matchups:
result.append({