fund: Improve type signature.

This commit is contained in:
Brett Smith 2020-07-01 15:57:58 -04:00
parent 7702a1f03c
commit ceb0c451fa

View file

@ -173,7 +173,7 @@ class ODSReport(core.BaseODS[FundPosts, None]):
self.document.spreadsheet.childNodes.reverse() self.document.spreadsheet.childNodes.reverse()
self.sheet = start_sheet self.sheet = start_sheet
def _row_balances(self, accounts_map: AccountsMap) -> Iterable[core.Balance]: def _row_balances(self, accounts_map: AccountsMap) -> Iterator[core.Balance]:
acct_order = ['Income', 'Expenses', 'Equity'] acct_order = ['Income', 'Expenses', 'Equity']
key_order = [core.OPENING_BALANCE_NAME, *acct_order, core.ENDING_BALANCE_NAME] key_order = [core.OPENING_BALANCE_NAME, *acct_order, core.ENDING_BALANCE_NAME]
balances: Dict[str, core.Balance] = {key: core.MutableBalance() for key in key_order} balances: Dict[str, core.Balance] = {key: core.MutableBalance() for key in key_order}