Skip to content

Commit

Permalink
Allow rrulesets for repeating transaction schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
jbhannah committed Dec 26, 2024
1 parent 781d335 commit bb6a3df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/budge/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import date as _date
from typing import Self

from dateutil.rrule import rrule
from dateutil.rrule import rrule, rruleset
from stockholm import Money

from . import account
Expand Down Expand Up @@ -30,10 +30,10 @@ def __lt__(self, other: Self):
class RepeatingTransaction(Transaction):
"""
A transaction that repeats on a schedule described by a
`dateutil.rrule.rrule`.
`dateutil.rrule.rrule` or `dateutil.rrule.rruleset`.
"""

schedule: rrule
schedule: rrule | rruleset

def __hash__(self):
return hash((self.amount, self.description, self.schedule))
Expand Down
2 changes: 1 addition & 1 deletion src/budge/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __post_init__(self, from_account: Account, to_account: Account):
class RepeatingTransfer(Transfer, RepeatingTransaction):
"""
A transfer between two accounts that repeats on a schedule described by a
`dateutil.rrule.rrule`.
`dateutil.rrule.rrule` or `dateutil.rrule.rruleset`.
"""

def __post_init__(self, from_account: Account, to_account: Account):
Expand Down

0 comments on commit bb6a3df

Please sign in to comment.