diff --git a/espn_api/basketball/league.py b/espn_api/basketball/league.py index 30a81e48..fbc3a799 100644 --- a/espn_api/basketball/league.py +++ b/espn_api/basketball/league.py @@ -11,6 +11,7 @@ from .constant import POSITION_MAP, ACTIVITY_MAP, TRANSACTION_TYPES class League(BaseLeague): + 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) diff --git a/espn_api/basketball/team.py b/espn_api/basketball/team.py index 95fccf08..075614f5 100644 --- a/espn_api/basketball/team.py +++ b/espn_api/basketball/team.py @@ -1,3 +1,5 @@ +from typing import List + from .player import Player from .matchup import Matchup from .constant import STATS_MAP @@ -25,7 +27,7 @@ def __init__(self, data, roster, schedule, year, **kwargs): self.stats = None self.standing = data['playoffSeed'] self.final_standing = data['rankCalculatedFinal'] - self.roster = [] + self.roster: List[Player] = [] self.schedule = [] if 'valuesByStat' in data: diff --git a/setup.py b/setup.py index ad5f9f90..46536bb0 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ description='ESPN API', long_description=readme, long_description_content_type="text/markdown", - install_requires=['requests>=2.0.0,<3.0.0'], + install_requires=['requests>=2.0.0,<3.0.0', 'urllib3<=2.2.3'], setup_requires=['nose>=1.0'], test_suite='nose.collector', tests_require=['nose', 'requests_mock', 'coverage'],