- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
31 lines
1.1 KiB
Markdown
31 lines
1.1 KiB
Markdown
---
|
|
id: f79584ea-e89d-4ba6-9b10-bc78d35eb92f
|
|
type: problem
|
|
title: "Duplicate constants.py files cause import pollution"
|
|
tags: [paper-dynasty, python, architecture, import-chain, technical-debt]
|
|
importance: 0.6
|
|
confidence: 0.8
|
|
created: "2025-12-08T03:46:37.031117+00:00"
|
|
updated: "2025-12-08T03:46:37.031117+00:00"
|
|
relations:
|
|
- target: 54bb1474-3df8-4cf1-bab9-3ef4d4b3e42e
|
|
type: SOLVES
|
|
direction: incoming
|
|
strength: 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
|