Address fragile module-level global mutation pattern in retrosheet_data.py
#14
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#14
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?
pd_cards/commands/retrosheet.py:104-118mutates globals at runtime.retrosheet_data.pyevaluates some globals at import time for derived values. Any value derived at import time is baked in before CLI can override, creating hidden ordering dependency.Priority: medium | Labels: tech-debt
Fixed in PR #48: #48
Replaced the 5 import-time derived globals (
MIN_PA_VL,MIN_PA_VR,MIN_TBF_VL,MIN_TBF_VR,CARDSET_ID) with plain scalar defaults, and collapsed the deadLAST_WEEK_RATIOternary. The CLI already explicitly sets all of these after import, so the derived expressions added hidden coupling with no benefit.