fix: remove top-level helpers.py after migration to helpers/ package (#33) #65

Closed
cal wants to merge 13 commits from ai/paper-dynasty-discord-33 into main
Owner

Summary

  • Deletes helpers.py (2153 lines) — the top-level module file that has been dead code since the helpers/ package was created
  • Python resolves import helpers and from helpers import ... to helpers/ (package with __init__.py) before checking helpers.py, so the file was never imported at runtime
  • All callers in the codebase already go through the package — no import changes needed

Files Changed

  • helpers.py — deleted

Verification

Grepped all import helpers / from helpers import usages across the codebase — every caller resolves to the helpers/ package. The helpers/__init__.py re-exports everything from helpers.main and the submodules, maintaining full backward compatibility.

Other observations

  • helpers.py used old-style imports (from constants import *, from discord_utils import *) that would have failed anyway since those top-level modules don't exist in isolation — further confirming it was never executed.
## Summary - Deletes `helpers.py` (2153 lines) — the top-level module file that has been dead code since the `helpers/` package was created - Python resolves `import helpers` and `from helpers import ...` to `helpers/` (package with `__init__.py`) before checking `helpers.py`, so the file was never imported at runtime - All callers in the codebase already go through the package — no import changes needed ## Files Changed - `helpers.py` — deleted ## Verification Grepped all `import helpers` / `from helpers import` usages across the codebase — every caller resolves to the `helpers/` package. The `helpers/__init__.py` re-exports everything from `helpers.main` and the submodules, maintaining full backward compatibility. ## Other observations - `helpers.py` used old-style imports (`from constants import *`, `from discord_utils import *`) that would have failed anyway since those top-level modules don't exist in isolation — further confirming it was never executed.
cal added 1 commit 2026-03-05 14:32:37 +00:00
fix: remove top-level helpers.py after migration to helpers/ package (#33)
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m12s
2eae57b8bb
Python resolves `import helpers` and `from helpers import ...` to the
helpers/ package (directory with __init__.py), so helpers.py has been
unreachable dead code since the package migration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cal added the
ai-reviewing
label 2026-03-05 14:45:32 +00:00
cal reviewed 2026-03-05 14:47:16 +00:00
cal left a comment
Author
Owner

AI Code Review

Files Reviewed

  • helpers.py (deleted — 2153 lines)
  • helpers/__init__.py (read for context)
  • helpers/main.py (read for context)

Findings

Correctness

  • Verified: Python resolves import helpers / from helpers import ... to helpers/ (the package with __init__.py) before checking helpers.py — this is standard Python package resolution. The file was dead code by definition once the package was created.
  • Verified via grep: All callers (cogs/, utilities/, in_game/, command_logic/, etc.) already use from helpers import ... or import helpers — all resolve to the package. No import changes needed.
  • Confirmed broken imports: helpers.py itself used from constants import *, from discord_ui import *, from random_content import *, from utils import (...) — these reference top-level modules that don't exist at the root level. The file would have failed to import even if Python had tried to use it.
  • helpers/__init__.py properly re-exports via from helpers.main import * plus all submodules (constants, utils, random_content, search_utils, discord_utils) — backward compatibility is maintained.
  • Noted: __pycache__/helpers.cpython-312.pyc and helpers.cpython-313.pyc exist — artifacts from before the package was created. These are benign stale cache files and will be ignored by Python at runtime.

Security

  • No issues found. Deletion of dead code only.

Style & Conventions

  • No issues found. Removing dead code is correct housekeeping.

Suggestions

  • None.

Verdict: APPROVED

Dead code confirmed on all fronts: Python package priority, broken legacy imports in helpers.py, and grep verification of all callers. Clean, zero-risk deletion.


Automated review by Claude PR Reviewer

## AI Code Review ### Files Reviewed - `helpers.py` (deleted — 2153 lines) - `helpers/__init__.py` (read for context) - `helpers/main.py` (read for context) ### Findings #### Correctness - **Verified**: Python resolves `import helpers` / `from helpers import ...` to `helpers/` (the package with `__init__.py`) before checking `helpers.py` — this is standard Python package resolution. The file was dead code by definition once the package was created. - **Verified via grep**: All callers (`cogs/`, `utilities/`, `in_game/`, `command_logic/`, etc.) already use `from helpers import ...` or `import helpers` — all resolve to the package. No import changes needed. - **Confirmed broken imports**: `helpers.py` itself used `from constants import *`, `from discord_ui import *`, `from random_content import *`, `from utils import (...)` — these reference top-level modules that don't exist at the root level. The file would have failed to import even if Python had tried to use it. - `helpers/__init__.py` properly re-exports via `from helpers.main import *` plus all submodules (constants, utils, random_content, search_utils, discord_utils) — backward compatibility is maintained. - **Noted**: `__pycache__/helpers.cpython-312.pyc` and `helpers.cpython-313.pyc` exist — artifacts from before the package was created. These are benign stale cache files and will be ignored by Python at runtime. #### Security - No issues found. Deletion of dead code only. #### Style & Conventions - No issues found. Removing dead code is correct housekeeping. #### Suggestions - None. ### Verdict: APPROVED Dead code confirmed on all fronts: Python package priority, broken legacy imports in `helpers.py`, and grep verification of all callers. Clean, zero-risk deletion. --- *Automated review by Claude PR Reviewer*
cal added
ai-reviewed
and removed
ai-reviewing
labels 2026-03-05 14:47:36 +00:00
cal changed target branch from main to next-release 2026-03-07 07:32:41 +00:00
cal force-pushed ai/paper-dynasty-discord-33 from 2eae57b8bb to 7d5b6c642a 2026-03-07 07:33:52 +00:00 Compare
cal changed target branch from next-release to main 2026-03-23 04:14:27 +00:00
Author
Owner

Closing — will re-implement fresh against main. Original PR had unrebaseable conflicts from the scouting refactor.

Closing — will re-implement fresh against `main`. Original PR had unrebaseable conflicts from the scouting refactor.
cal closed this pull request 2026-03-23 04:15:36 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 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-discord#65
No description provided.