Fix running() assigning xb_pct = 20 on parse error
#8
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-card-creation#8
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
batters/calcs_batter.py:485-487— On parse failure,xb_pct = 20(raw integer, not fraction). Computesround(6 + (10 * 20)) = 206, clamped to max 17 = elite baserunning rating. Any player with unparseable XBT% silently gets maximum speed.Priority: medium | Labels: bug
Fixed in PR #37: #37
Changed the
exceptblock inrunning()toreturn 8instead of settingxb_pct = 20. Parse errors now produce the same conservative average rating (8) as an empty string, rather than silently awarding elite baserunning.