Skip to content

Fix: do not use lists as defaults in function definitions#147

Open
NodeJSmith wants to merge 1 commit intohammem:mainfrom
NodeJSmith:fix/do_not_use_lists_in_function_defs
Open

Fix: do not use lists as defaults in function definitions#147
NodeJSmith wants to merge 1 commit intohammem:mainfrom
NodeJSmith:fix/do_not_use_lists_in_function_defs

Conversation

@NodeJSmith
Copy link

Update get_transactions to set category_ids, account_ids, and tag_ids to be None instead of an empty list, as these are only evaluated once when the function is defined, meaning that the list would be shared across all instances of the call.

It doesn't appear that this is causing any issues yet but it seems better to be proactive.

keithah added a commit to keithah/monarchmoney-enhanced that referenced this pull request Sep 2, 2025
- Fix get_transactions() mutable default arguments bug (hammem#147)
- Add is_credit parameter for filtering credit/debit transactions
- Add abs_amount_range parameter for filtering by amount ranges
- Update CHANGELOG with references to original PRs

Fixes from hammem/monarchmoney repository:
- PR hammem#147: hammem#147
- PR hammem#148: hammem#148

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
keithah added a commit to keithah/monarchmoney-enhanced that referenced this pull request Sep 3, 2025
- Fix get_transactions() mutable default arguments bug (hammem#147)
- Add is_credit parameter for filtering credit/debit transactions
- Add abs_amount_range parameter for filtering by amount ranges
- Update CHANGELOG with references to original PRs

Fixes from hammem/monarchmoney repository:
- PR hammem#147: hammem#147
- PR hammem#148: hammem#148

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant