Skip to content

Commit bb2c0c2

Browse files
committed
wip: step
1 parent f9641ad commit bb2c0c2

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/beanahead/rx_txns.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ def get_definition_group(definition: Transaction) -> GrouperKey:
209209
if account == bal_sheet_account:
210210
continue
211211
account_type = get_account_type(account)
212-
if account_type == "Assets":
212+
if account_type == utils.RootAccountsContext.get("name_assets", "Assets"):
213213
other_sides.add("Assets")
214-
elif account_type == "Income":
214+
elif account_type == utils.RootAccountsContext.get("name_income", "Income"):
215215
other_sides.add("Income")
216216
else:
217217
other_sides.add("Expenses")
@@ -285,7 +285,7 @@ def get_group_heading(group: GrouperKey) -> str:
285285
return "Other definitions"
286286

287287

288-
def compose_definitions_content(txns: list[Transaction], name_options: dict[str]) -> str:
288+
def compose_definitions_content(txns: list[Transaction]) -> str:
289289
"""Compose content for a Regular Expected Transaction Definitions file.
290290
291291
Parameters

src/beanahead/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def is_assets_account(string: str) -> bool:
551551
>>> is_assets_account("Assets:US:BofA:Checking")
552552
True
553553
"""
554-
return is_account_type(RootAccountsContext.get("name_assets", Assets), string)
554+
return is_account_type(RootAccountsContext.get("name_assets", "Assets"), string)
555555

556556

557557
def is_balance_sheet_account(string: str) -> bool:
@@ -579,7 +579,7 @@ def is_balance_sheet_account(string: str) -> bool:
579579
"""
580580
return any(is_account_type(acc_type, string) for acc_type in [
581581
RootAccountsContext.get("name_assets", "Assets"),
582-
RootAccountsContext.get("name_liabilities", "Assets"),
582+
RootAccountsContext.get("name_liabilities", "Liabilities"),
583583
])
584584

585585

0 commit comments

Comments
 (0)