File diff 58b02b6f33c2 → cc0656dde9b1
conservancy_beancount/reports/core.py
Show inline comments
...
 
@@ -21,6 +21,8 @@ from decimal import Decimal
 

	
 
import babel.numbers  # type:ignore[import]
 

	
 
from beancount.core import amount as bc_amount
 

	
 
from .. import data
 

	
 
from typing import (
...
 
@@ -73,6 +75,11 @@ class Balance(Mapping[str, data.Amount]):
 
    def __str__(self) -> str:
 
        return self.format()
 

	
 
    def __abs__(self) -> 'Balance':
 
        return type(self)(
 
            (key, bc_amount.abs(amt)) for key, amt in self.items()
 
        )
 

	
 
    def __eq__(self, other: Any) -> bool:
 
        if (self.is_zero()
 
            and isinstance(other, Balance)