With the following definitions:
fromlpythonimportdataclass, i64@dataclassclassTransactionItem:
account_idx: i64commodity: stramount: i64@dataclassclassTransaction:
date: strname: strcleared: boolcomments: stritems: list[TransactionItem]
@dataclassclassAccount:
name: str@dataclassclassTransactions:
transactions: list[Transaction]
accounts: list[Account]
This does not work:
asr: Transactions=Transactions(transactions=[], accounts=[])
This workaround works:
transactions: list[Transaction] = []
accounts: list[Account] = []
asr: Transactions=Transactions(transactions=transactions, accounts=accounts)
With the following definitions:
This does not work:
This workaround works: