Extract shared _resolve_player helper from jersey.py and checkout.py #262
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/basketball-api#262
Loading…
Add table
Add a link
Reference in a new issue
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?
Type
Feature
Lineage
Discovered scope from QA review of basketball-api PR #261 (2026-03-30).
Repo
forgejo_admin/basketball-apiUser Story
As a developer
I want shared helper functions in one location
So that logic isn't duplicated across route modules
Context
PR #261 added
_resolve_player()to bothroutes/jersey.pyandroutes/checkout.py. The function is identical in both files -- resolves a player from a parent's roster by optional player_id, defaulting to first player. QA flagged this as a DRY violation.File Targets
Files the agent should modify:
src/basketball_api/routes/jersey.py-- remove_resolve_player, import from shared locationsrc/basketball_api/routes/checkout.py-- remove_resolve_player, import from shared locationsrc/basketball_api/helpers.pyorsrc/basketball_api/utils.py-- create shared_resolve_player(follow existing patterns for shared helpers)Files the agent should NOT touch:
src/basketball_api/auth.py-- auth logic is separateAcceptance Criteria
_resolve_playerexists in exactly one locationTest Expectations
pytest tests/ -x -qConstraints
Checklist
Related
project-westside-basketball