diff --git a/conservancy_beancount/reports/balance_sheet.py b/conservancy_beancount/reports/balance_sheet.py index 5dcb5c4..ee97bd0 100644 --- a/conservancy_beancount/reports/balance_sheet.py +++ b/conservancy_beancount/reports/balance_sheet.py @@ -189,14 +189,16 @@ class Balances: return prefix, -max_bal return sorted(class_bals, key=sortkey) - def iter_accounts(self, root: str) -> Iterable[data.Account]: + def iter_accounts(self, root: str) -> Sequence[data.Account]: start_date = self.period_range.start stop_date = self.period_range.stop - for account in data.Account.iter_accounts(root): - meta = account.meta - if (meta.open_date < stop_date - and (meta.close_date is None or meta.close_date > start_date)): - yield account + return sorted( + account + for account in data.Account.iter_accounts(root) + if account.meta.open_date < stop_date + and (account.meta.close_date is None + or account.meta.close_date > start_date) + ) class Report(core.BaseODS[Sequence[None], None]): diff --git a/setup.py b/setup.py index 576a4fa..f56b655 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup setup( name='conservancy_beancount', description="Plugin, library, and reports for reading Conservancy's books", - version='1.8.2', + version='1.8.3', author='Software Freedom Conservancy', author_email='info@sfconservancy.org', license='GNU AGPLv3+',