Repository navigation
ESPN: fix rotated pro-team labels 26/27/28 (UTA/WAS/TOR), single-source the map - #182
Merged
Merged
Conversation
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.
What
Fixes a verified display bug:
waivers.py's privatePRO_TEAM_ABBRcopy had pro teams 26/27/28 rotated, so the waiver report (and roster-edit previews) mislabeled players — e.g. it printed Utah's Mo Bamba as "TOR", which produced a wrong "Bamba plays for Toronto" claim to the user on 2026-10-30.pro_team_id26scoreboard.pyalready treated 27 as WashingtonAudit
scoreboard.py's documented id space and the canonical ESPN pro-team ids: no other disagreements.scoreboard.pyitself agrees with the anchors everywhere (no change needed there beyond hosting the map; its docstring's "WSH" spelling for 27 is normalized to "WAS" to match the map's style).waivers.pyheld the only hardcoded id→abbreviation map.lineup.pyworks purely in numeric ids;roster_edits.py/trades.pyalready readwaivers.PRO_TEAM_ABBR, so they inherit the fix.Structure
Single source of truth: the canonical map now lives in
espn/scoreboard.py(the module that owns the pro-team-id space), andwaivers.pyimports/re-exports it, so the two modules cannot drift again. The stale waivers comment that asserted the wrong rotation (and claimed scoreboard was wrong) is replaced with the anchor history.Scope
Display-layer only:
games_next_7dcounts and all FP math are keyed by numeric id and unchanged; response shapes unchanged (samepro_teamfield, corrected values). ESPN tests: 559 → 562 passed (3 new tests pin the anchors, the full canonical map, and the waivers↔scoreboard single-source identity). Full backend suite shows the same 6 pre-existing Dice/Trips local-harness failures as unmodified main.