diff --git a/conservancy_beancount/data.py b/conservancy_beancount/data.py index 33b036d45e26b61c91de4c12205ffff8f6e3f3d0..fbbdd4f0c167724ca297eec9e79728c08626534f 100644 --- a/conservancy_beancount/data.py +++ b/conservancy_beancount/data.py @@ -285,6 +285,12 @@ class Account(str): return prefix return None + def keeps_balance(self) -> bool: + return self.is_under( + self._options_map['name_assets'], + self._options_map['name_liabilities'], + ) is not None + def _find_part_slice(self, index: int) -> slice: if index < 0: raise ValueError(f"bad part index {index!r}")