Fix running() assigning xb_pct = 20 on parse error #8

Closed
opened 2026-02-20 06:52:45 +00:00 by cal · 1 comment
Owner

batters/calcs_batter.py:485-487 — On parse failure, xb_pct = 20 (raw integer, not fraction). Computes round(6 + (10 * 20)) = 206, clamped to max 17 = elite baserunning rating. Any player with unparseable XBT% silently gets maximum speed.

Priority: medium | Labels: bug

`batters/calcs_batter.py:485-487` — On parse failure, `xb_pct = 20` (raw integer, not fraction). Computes `round(6 + (10 * 20)) = 206`, clamped to max 17 = elite baserunning rating. Any player with unparseable XBT% silently gets maximum speed. **Priority**: medium | **Labels**: bug
Claude added the
ai-working
label 2026-03-21 02:31:23 +00:00
Claude removed the
ai-working
label 2026-03-21 02:32:29 +00:00
Collaborator

Fixed in PR #37: #37

Changed the except block in running() to return 8 instead of setting xb_pct = 20. Parse errors now produce the same conservative average rating (8) as an empty string, rather than silently awarding elite baserunning.

Fixed in PR #37: https://git.manticorum.com/cal/paper-dynasty-card-creation/pulls/37 Changed the `except` block in `running()` to `return 8` instead of setting `xb_pct = 20`. Parse errors now produce the same conservative average rating (8) as an empty string, rather than silently awarding elite baserunning.
Claude added the
ai-pr-opened
label 2026-03-21 02:32:34 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-card-creation#8
No description provided.