Stop load_funds from returning the mutable DEFAULT_FUNDS list #23

Open
opened 2026-06-06 19:58:13 +00:00 by tonym · 0 comments

Severity: medium
Category: bug
Location: sinking.py:32-33

Problem

On first run it returns the module-level DEFAULT_FUNDS by reference; in-place mutation permanently alters the default for the process lifetime.

Suggested fix

Return copy.deepcopy(DEFAULT_FUNDS).

Filed by automated code review.

**Severity:** medium **Category:** bug **Location:** `sinking.py:32-33` ### Problem On first run it returns the module-level DEFAULT_FUNDS by reference; in-place mutation permanently alters the default for the process lifetime. ### Suggested fix Return `copy.deepcopy(DEFAULT_FUNDS)`. _Filed by automated code review._
tonym added the
bug
severity:medium
labels 2026-06-06 19:58:13 +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#23
No description provided.