Skip to content

Commit

Permalink
backwards compatible typing
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanEmb committed Dec 7, 2024
1 parent 2d2da0b commit 25bac50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion espn_api/basketball/league.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .constant import POSITION_MAP, ACTIVITY_MAP, TRANSACTION_TYPES

class League(BaseLeague):
teams: list[Team]
teams: List[Team]
'''Creates a League instance for Public/Private ESPN league'''
def __init__(self, league_id: int, year: int, espn_s2=None, swid=None, fetch_league=True, debug=False):
super().__init__(league_id=league_id, year=year, sport='nba', espn_s2=espn_s2, swid=swid, debug=debug)
Expand Down
4 changes: 3 additions & 1 deletion espn_api/basketball/team.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import List

from .player import Player
from .matchup import Matchup
from .constant import STATS_MAP
Expand All @@ -23,7 +25,7 @@ def __init__(self, data, roster, schedule, year, **kwargs):
self.stats = None
self.standing = data['playoffSeed']
self.final_standing = data['rankCalculatedFinal']
self.roster: list[Player] = []
self.roster: List[Player] = []
self.schedule = []

if 'valuesByStat' in data:
Expand Down

0 comments on commit 25bac50

Please sign in to comment.