Removing duplicate logic for week override
This commit is contained in:
parent
23cb006f23
commit
8877ebee47
7
app.py
7
app.py
|
|
@ -23,11 +23,8 @@ def extract_positional_data(lineup: list, position: str) -> int:
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
def extract_matchup_box_scores(league: League, week_override: int = None) -> dict:
|
def extract_matchup_box_scores(league: League, week_override: int) -> dict:
|
||||||
week_to_process = league.current_week
|
matchups = league.box_scores(week=week_override)
|
||||||
if week_override:
|
|
||||||
week_to_process = week_override
|
|
||||||
matchups = league.box_scores(week=week_to_process)
|
|
||||||
result = []
|
result = []
|
||||||
for matchup in matchups:
|
for matchup in matchups:
|
||||||
result.append({
|
result.append({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue