fix: remove duplicate sheets.open_by_key() call in get_full_roster_from_sheets (#30) #56
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#56
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/paper-dynasty-discord-30"
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 the duplicate
sheets.open_by_key(this_team.gsheet)call on line 1161 ofcommand_logic/logic_gameplay.py. The function called the Google Sheets API twice back-to-back with no logic between the calls, causing an unnecessary round-trip.Changes
command_logic/logic_gameplay.py: removed redundant secondsheets.open_by_key()callOther observations
The commit also includes pre-existing cosmetic reformatting changes in
logic_gameplay.pythat were already in the working tree before this fix (not introduced by this PR's change). All changes are formatting-only and functionally equivalent.AI Code Review
Files Reviewed
command_logic/logic_gameplay.py(modified)Findings
Correctness
sheets.open_by_key(this_team.gsheet)call is confirmed in the pre-patch file. Lines 1159–1161 show two consecutive calls with no logic between them — the first result is immediately overwritten. Removing the first call is correct and eliminates an unnecessary Google Sheets API round-trip.Security
Style & Conventions
Suggestions
Verdict: APPROVED
Simple, correct fix. The duplicate API call removal is unambiguous and the accompanying reformatting is safe and style-consistent. No concerns.
Automated review by Claude PR Reviewer
abffbab1e2toceff1bcb9b