fix: remove dead LAST_WEEK_RATIO ternary — both branches are 0.0 (#19) #45

Merged
Claude merged 3 commits from ai/paper-dynasty-card-creation-19 into main 2026-03-23 03:52:59 +00:00
Collaborator

Closes #19

Summary

Removes a dead conditional at retrosheet_data.py:70 where both branches of the ternary evaluated to 0.0:

# Before (dead code)
LAST_WEEK_RATIO = 0.0 if PLAYER_DESCRIPTION == "Live" else 0.0

# After
LAST_WEEK_RATIO = 0.0

Files Changed

  • retrosheet_data.py — 1-line change, no behaviour change

Tests

No test suite in this repo. Change is a pure simplification with no functional impact.

Closes #19 ## Summary Removes a dead conditional at `retrosheet_data.py:70` where both branches of the ternary evaluated to `0.0`: ```python # Before (dead code) LAST_WEEK_RATIO = 0.0 if PLAYER_DESCRIPTION == "Live" else 0.0 # After LAST_WEEK_RATIO = 0.0 ``` ## Files Changed - `retrosheet_data.py` — 1-line change, no behaviour change ## Tests No test suite in this repo. Change is a pure simplification with no functional impact.
Claude added 1 commit 2026-03-21 12:03:48 +00:00
Closes #19

The conditional `0.0 if PLAYER_DESCRIPTION == 'Live' else 0.0` is dead
code: both branches evaluate to the same value. Simplified to a direct
assignment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude added the
ai-reviewing
label 2026-03-21 12:15:48 +00:00
Claude reviewed 2026-03-21 12:16:16 +00:00
Claude left a comment
Author
Collaborator

AI Code Review

Files Reviewed

  • retrosheet_data.py (modified, line 70)

Findings

Correctness

  • Change is correct. Both branches of the original ternary evaluated to 0.0, so the simplified assignment is behaviourally identical.
  • Downstream usages at lines 388, 396, 401, 517, 525, and 530 all compare LAST_WEEK_RATIO == 0.0 or > 0 — none of these are affected.

Security

  • No issues found.

Style & Conventions

  • Follows CLAUDE.md guidance: avoid unnecessary complexity, remove dead code. Clean and minimal change.

Suggestions

  • None.

Verdict: COMMENT (LGTM)

Pure dead-code removal with no functional impact. The ternary was always 0.0 if … else 0.0, so collapsing it to a direct assignment is the right call. Safe to merge.


Automated review by Claude PR Reviewer

## AI Code Review ### Files Reviewed - `retrosheet_data.py` (modified, line 70) ### Findings #### Correctness - Change is correct. Both branches of the original ternary evaluated to `0.0`, so the simplified assignment is behaviourally identical. - Downstream usages at lines 388, 396, 401, 517, 525, and 530 all compare `LAST_WEEK_RATIO == 0.0` or `> 0` — none of these are affected. #### Security - No issues found. #### Style & Conventions - Follows CLAUDE.md guidance: avoid unnecessary complexity, remove dead code. Clean and minimal change. #### Suggestions - None. ### Verdict: COMMENT (LGTM) Pure dead-code removal with no functional impact. The ternary was always `0.0 if … else 0.0`, so collapsing it to a direct assignment is the right call. Safe to merge. --- *Automated review by Claude PR Reviewer*
Claude added
ai-reviewed
and removed
ai-reviewing
labels 2026-03-21 12:16:44 +00:00
Claude added 1 commit 2026-03-23 03:51:09 +00:00
cal approved these changes 2026-03-23 03:51:59 +00:00
cal left a comment
Owner

Approved — safe bug fix per PO triage.

Approved — safe bug fix per PO triage.
Claude added 1 commit 2026-03-23 03:52:55 +00:00
Claude merged commit 6d0497431f into main 2026-03-23 03:52:59 +00:00
Claude deleted branch ai/paper-dynasty-card-creation-19 2026-03-23 03:53:00 +00:00
Sign in to join this conversation.
No reviewers
cal
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#45
No description provided.