fix: remove top-level discord_utils.py duplicate (#34) #62
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#62
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/paper-dynasty-discord-34"
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
discord_utils.py(top-level, 252 lines) — identical duplicate ofhelpers/discord_utils.pyhelpers/main.pyline 36:from discord_utils import *→from .discord_utils import *(relative import from helpers package)helpers.pyline 36:from discord_utils import *→from helpers.discord_utils import *What was fixed
The top-level
discord_utils.pywas a dead duplicate ofhelpers/discord_utils.py. Both files were exactly 251 lines with identical content.The import in
helpers/main.py(loaded byhelpers/__init__.py) pointed at the top-level file; this PR redirects it to the canonicalhelpers/discord_utils.pyvia a relative import, then deletes the duplicate.helpers.pyis effectively superseded by thehelpers/package (Python loads the package, not the.pyfile), but its import was updated for consistency. Note:helpers.pypicked up one cosmetic linter reformatting at line 1685 (no behavioral change).Files changed
discord_utils.py— deletedhelpers/main.py— relative import fixhelpers.py— absolute import fixTests
No test suite exists for this module. Verified by reading back modified files.
🤖 Generated with Claude Code
AI Code Review
Files Reviewed
discord_utils.py(deleted — top-level duplicate)helpers/main.py(modified — relative import fix)helpers.py(modified — absolute import fix)helpers/__init__.py(read for context — unchanged)Findings
Correctness
discord_utils.pyis confirmed identical tohelpers/discord_utils.py— the duplicate claim is accurate.helpers/main.pyline 36:from .discord_utils import *is the correct relative import for a module inside thehelpers/package. Resolves tohelpers/discord_utils.pyas intended.helpers.pyline 36:from helpers.discord_utils import *is the correct absolute import. Note:helpers.pyis superseded by thehelpers/package at runtime (Python loads the package), so this change is cosmetic/consistency only.discord_utils— no missed callers.helpers/__init__.pyline 29 already importsfrom .discord_utils import *directly, independent ofhelpers/main.py. The package's export namespace is unaffected.Import Chain After PR
helpers/__init__→helpers.main→ top-leveldiscord_utils(duplicate) ANDhelpers/__init__→helpers/discord_utilshelpers/__init__→helpers.main→helpers/discord_utilsANDhelpers/__init__→helpers/discord_utilsSecurity
Style & Conventions
helpers/main.py:1681–1683andhelpers.py:1682–1684(.description = (f"...")→.description = f"..."). No behavioral change.Suggestions
Verdict: APPROVED
Clean, well-scoped dead-code removal. All callers updated, no regressions introduced, import chain correctly redirected to the canonical
helpers/discord_utils.py. Resolves issue #34.Automated review by Claude PR Reviewer
36e3c782c2tobb548da0c6Closing — will re-implement fresh against
main. Original PR had unrebaseable conflicts from the scouting refactor.Pull request closed