Extract shared storage helper (DATA_DIR/load/save duplicated 7x) #31

Closed
opened 2026-06-06 19:58:15 +00:00 by tonym · 0 comments

Severity: medium
Category: tech-debt
Location: bills.py, sinking.py, mortgage.py, assets.py, debts.py, income.py

Problem

Every module re-declares DATA_DIR and identical load/save bodies; month_key and OWNER_COLORS are each duplicated twice. A storage-strategy change must touch every module.

Suggested fix

Create storage.py with DATA_DIR, atomic load_json/save_json, month_key, OWNER_COLORS; import everywhere.

Filed by automated code review.

**Severity:** medium **Category:** tech-debt **Location:** `bills.py, sinking.py, mortgage.py, assets.py, debts.py, income.py` ### Problem Every module re-declares DATA_DIR and identical load/save bodies; month_key and OWNER_COLORS are each duplicated twice. A storage-strategy change must touch every module. ### Suggested fix Create storage.py with DATA_DIR, atomic load_json/save_json, month_key, OWNER_COLORS; import everywhere. _Filed by automated code review._
tonym added the
tech-debt
severity:medium
labels 2026-06-06 19:58:15 +00:00
tonym closed this issue 2026-06-06 21:34:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bonna61/Moon-Household-Budget#31
No description provided.