claude-memory/graph/problems/duplicate-constantspy-files-cause-import-pollution-f79584.md
Cal Corum b140d4d82a migrate: 313 memories from MemoryGraph
- 313 new markdown files created
- 30 relationships embedded
- 313 entries indexed
- State initialized with usage data
2026-02-13 11:11:48 -06:00

1.1 KiB

id type title tags importance confidence created updated relations
f79584ea-e89d-4ba6-9b10-bc78d35eb92f problem Duplicate constants.py files cause import pollution
paper-dynasty
python
architecture
import-chain
technical-debt
0.6 0.8 2025-12-08T03:46:37.031117+00:00 2025-12-08T03:46:37.031117+00:00
target type direction strength
54bb1474-3df8-4cf1-bab9-3ef4d4b3e42e SOLVES incoming 0.5

Paper Dynasty discord-app has two constants.py files:

  1. discord-app/constants.py (root) - authoritative, updated regularly
  2. discord-app/helpers/constants.py - created during refactoring, becomes stale

helpers/init.py does: from helpers.main import * # Gets PD_SEASON from root from .constants import * # OVERWRITES with stale value!

This causes helpers.PD_SEASON to differ from constants.PD_SEASON even when both files are in the same codebase.

Future Fix Options:

  1. Remove helpers/constants.py entirely, use root constants.py only
  2. Have helpers/constants.py import from root: from constants import *
  3. Use explicit imports instead of wildcard star imports