Fix wrong ESPN team codes in pickers and help text - #234
Conversation
Several plugins documented — or in one case offered in a picker — team
abbreviations that ESPN does not use, so copying them matched no team and
the plugin silently showed nothing.
odds-ticker's NHL picker was the only one where the user could not work
around it: it listed UTA (a retired code, labelled with the club's former
name "Utah Hockey Club" rather than "Utah Mammoth") and omitted the
Seattle Kraken entirely, so that team could not be selected at all. The
enum and labels are now generated from ESPN's team endpoint and match it
exactly at 32 teams.
The rest are description-only corrections to the favorite_teams examples:
basketball NBA GSW -> GS (Golden State Warriors)
basketball WNBA NYL -> NY (New York Liberty)
basketball WNBA LAS -> LA (Los Angeles Sparks)
basketball NCAAW UCONN -> CONN (UConn Huskies)
basketball NCAAW SCAR -> SC (South Carolina Gamecocks)
football NCAAFB BAMA -> ALA (Alabama Crimson Tide)
hockey NCAAWH WISC -> WIS (Wisconsin Badgers)
Each description now also says these are ESPN's codes and are not always
the ones you would guess, since that is the underlying trap.
Every code here was verified against
site.api.espn.com/apis/site/v2/sports/{sport}/{league}/teams?limit=1000.
The limit matters: without it the default page size truncates the NCAA
responses (362 of 755 teams) and makes valid codes look wrong.
Left alone deliberately: lacrosse-scoreboard's WISC/MINN/OSU and
BU/BC/MICH examples, and baseball-scoreboard's MiLB DUR/SWB/NOR, because
ESPN's lacrosse team endpoints return zero teams and the MiLB one 404s.
Unverifiable, so not guessed at.
No rendering code changed; the safety harness passes for all four plugins
at every size.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
Two issues flagged by Codacy on the previous commit: - Dropped an unused 're' import left over from an earlier draft. - Pinned the URL scheme to https before opening it. The league path is interpolated into the URL, and urlopen would honour file:// or a custom scheme if a path ever arrived from somewhere less trustworthy than the hardcoded table. Bandit's B310 is a syntactic blacklist rule so it still fires on the call itself; annotated with the reason rather than left to look unexamined. Verified: bandit clean, the guard rejects a file:// URL, and the checker still fetches all 32 NHL teams and still exits 1 against main (which is correct until #234 lands). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ MSG
hockey 1.5.1->1.6.0, basketball 1.8.1->1.9.0; odds-ticker moves to 1.1.9 (main took 1.1.8). plugins.json regenerated via update_registry.py. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FgbA8SMutQQpXkMG8LMmC4
What
Several plugins documented — or in one case offered in a picker — team abbreviations that ESPN does not actually use. Because favorite-team matching is by abbreviation, copying a documented example matched no team and the plugin silently showed nothing, with no indication the code was the problem.
Found while investigating a user report that
MUNfor Manchester United wasn't matching in the soccer plugin (fixed separately in #233); I audited every other plugin that matches teams by abbreviation.The one real bug: odds-ticker's NHL picker
This is the only case a user could not work around, since it's a
checkbox-grouppicker rather than free text:UTAwas listed — a retired code, and labelled with the club's former name "Utah Hockey Club" instead of "Utah Mammoth". ESPN usesUTAH.The enum and labels are now generated from ESPN's team endpoint and match it exactly at 32 teams (
enumkeys ==labelskeys).Description-only corrections
GSWGSNYLNYLASLAUCONNCONNSCARSCBAMAALAWISCWISEach description now also notes that these are ESPN's codes and aren't always the ones you'd guess, since that's the actual trap —
BAMAandGSWare what a fan would reach for first.Verification
Every code was checked against
site.api.espn.com/apis/site/v2/sports/{sport}/{league}/teams?limit=1000.The
limit=1000matters. Without it the default page size truncates the NCAA responses (362 of 755 teams), which made several valid codes look wrong — an earlier pass of this audit produced false positives that way.Deliberately not changed
lacrosse-scoreboard—WISC/MINN/OSUandBU/BC/MICH: ESPN'smens-college-lacrosseandwomens-college-lacrosseteam endpoints both return 0 teams.baseball-scoreboard— MiLBDUR/SWB/NOR: that endpoint 404s.Unverifiable either way, so flagged rather than guessed at.
Testing
No rendering code changed. Still ran the full safety harness for all four plugins — all sizes PASS.
check_module_collisions.pyclean across 42 plugins. Thefill warn: extent 0%x0%notes in harness output are offseason no-data and are present onmaintoo.