fix: remove empty if-pass stubs after db_post calls in complete_game (#38) #71
No reviewers
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#71
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/paper-dynasty-discord-38"
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?
Summary
Removes two dead
if len(resp) > 0: passstubs incomplete_game()(command_logic/logic_gameplay.py:4299-4309).resp = await db_post(...)and then immediately didif len(resp) > 0: pass— no actual validation, logging, or error handling.if-blocks and the now-unusedresp =variable assignments, replacingresp = await db_post(...)with plainawait db_post(...).Files Changed
command_logic/logic_gameplay.py— removed 6 lines of dead code (2if-blocks + 2resp =assignments + blank lines)Notes
A ruff LSP auto-formatter also applied cosmetic reformatting to several unrelated sections of the file on save (blank line normalization, ternary/tuple formatting). These changes are purely stylistic and have no behavioral impact.
Tests
No test suite configured for this repo (per CLAUDE.md).
AI Code Review
Files Reviewed
command_logic/logic_gameplay.py(modified)Findings
Correctness
if len(resp) > 0: passstubs are confirmed dead code — no validation, logging, or error handling was ever performed. Removing them is correct.resp =variable assignments are now unused after the stub removal; dropping them in favor of bareawait db_post(...)is the right cleanup.if len(resp) > 0: passchecks would have raised aNameErrorif eitherdb_postcall threw an exception (sincerespwould be unassigned at that point). This PR implicitly removes that latent error path along with the dead stubs.Security
Style & Conventions
Suggestions
Verdict: APPROVED
Clean dead-code removal. The
resp =/if len(resp) > 0: passpattern was a placeholder that never did anything; the refactored calls are clearer and equivalent. Ruff reformats are harmless. No blocking issues.Automated review by Claude PR Reviewer
41c33e6d42toec0945af3aClosing — will re-implement fresh against
main. Original PR had unrebaseable conflicts from the scouting refactor.Pull request closed