Add 2026 WNBA expansion teams (Toronto Tempo, Portland Fire) to PRO_TEAM_MAP#695
Open
kohzy wants to merge 1 commit into
Open
Add 2026 WNBA expansion teams (Toronto Tempo, Portland Fire) to PRO_TEAM_MAP#695kohzy wants to merge 1 commit into
kohzy wants to merge 1 commit into
Conversation
Toronto Tempo (proTeamId=131935) and Portland Fire (proTeamId=132052)
joined the WNBA for the 2026 season. Without these mappings, instantiating
League(year=2026) raises KeyError in wbasketball/player.py when any team
roster contains a player on either franchise.
Repro:
from espn_api.wbasketball import League
League(league_id=<id>, year=2026, espn_s2=..., swid=...)
# KeyError: 131935 (or 132052)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the two new 2026 WNBA franchises to
espn_api/wbasketball/constant.py::PRO_TEAM_MAP:131935: 'Tor'— Toronto Tempo132052: 'Por'— Portland FireWhy
Without these entries, instantiating
League(year=2026, ...)raisesKeyErroras soon as any roster contains a player on either franchise, becausewbasketball/player.py:13does an unguarded lookup:Traceback:
This blocks all 2026 league access for any league with at least one Tempo or Fire player rostered (which in practice is most of them).
Repro
The fix follows the existing precedent for Golden State Valkyries (
129689: 'GSV'), which was added to the same map last season.Test plan
https://lm-api-reads.fantasy.espn.com/apis/v3/games/wfba/seasons/2026/segments/0/leagues/{id}?view=mTeam&view=mRosterand inspectingproTeamIdvalues for known Tempo/Fire players.League(year=2026, ...)no longer raises and returns full rosters across multiple leagues after applying the patch.🤖 Generated with Claude Code