Standardize home-run detection to use _on_final fields only
#22
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
ai-working
bug
enhancement
feature
in-queue
performance
security
tech-debt
todo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-discord#22
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?
db_calls_gameplay.py:1289notes# patch to handle little league home runs TODO: standardize on just _on_final for these. Two-path handling introduces potential scoring inconsistency.Fixed in PR #68: #68
Approach: Before the HR detection check in
complete_play(), setthis_play.batter_final = batter_to_basewhenbatter_to_baseis provided. This makesbatter_final(an_on_finalfield) the authoritative source, so the check simplifies frombatter_final == 4 or batter_to_base == 4to justbatter_final == 4. The TODO comment is also removed.Fixed in PR #106. In
complete_play()indb_calls_gameplay.py,batter_finalis now set tobatter_to_basewhen it is not None before the HR check, so onlythis_play.batter_final == 4needs to be tested. The redundantor batter_to_base == 4path and the patch comment are removed.