Fix unreachable duplicate elif 'DO*' branch in result_string() #6

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

creation_helpers.py:882-884 — Second elif 'DO*' is dead code. First always matches. One adjustment (likely for DO** variant) is silently skipped, producing incorrect card formatting.

Priority: medium | Labels: bug

`creation_helpers.py:882-884` — Second `elif 'DO*'` is dead code. First always matches. One adjustment (likely for `DO**` variant) is silently skipped, producing incorrect card formatting. **Priority**: medium | **Labels**: bug
Claude added the
ai-working
label 2026-03-21 04:31:20 +00:00
Claude added the
ai-pr-opened
label 2026-03-21 04:33:23 +00:00
Collaborator

Fixed in PR #39: #39

The second elif "DO*" was replaced with elif "DO**" and reordered before the "DO*" check. Since "DO*" in "DO**" is True, the more-specific DO** branch must come first to be reachable. This restores the intended spaces -= 2 adjustment for double-double hits.

Fixed in PR #39: https://git.manticorum.com/cal/paper-dynasty-card-creation/pulls/39 The second `elif "DO*"` was replaced with `elif "DO**"` and reordered before the `"DO*"` check. Since `"DO*" in "DO**"` is `True`, the more-specific `DO**` branch must come first to be reachable. This restores the intended `spaces -= 2` adjustment for double-double hits.
Claude removed the
ai-working
label 2026-03-21 04:33:30 +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#6
No description provided.