Changeset - ae974b8e50c0
[Not reviewed]
0 1 0
Brett Smith - 4 years ago 2020-06-18 18:06:18
brettcsmith@brettcsmith.org
reports: Balance.copy() accepts tolerance argument.
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reports/core.py
Show inline comments
...
 
@@ -167,8 +167,10 @@ class Balance(Mapping[str, data.Amount]):
 
    ) -> bool:
 
        return all(op_func(amt.number, operand) for amt in self.values())
 

	
 
    def copy(self: BalanceType) -> BalanceType:
 
        return type(self)(self.values())
 
    def copy(self: BalanceType, tolerance: Optional[Decimal]=None) -> BalanceType:
 
        if tolerance is None:
 
            tolerance = self.tolerance
 
        return type(self)(self.values(), tolerance)
 

	
 
    def clean_copy(self: BalanceType, tolerance: Optional[Decimal]=None) -> BalanceType:
 
        if tolerance is None:
0 comments (0 inline, 0 general)