reports: Balance.clean_copy() creates new Balance with given tolerance.

This commit is contained in:
Brett Smith 2020-06-18 14:05:49 -04:00
parent 0f7a154ff4
commit 355a48381c

View file

@ -174,8 +174,8 @@ class Balance(Mapping[str, data.Amount]):
if tolerance is None:
tolerance = self.tolerance
return type(self)(
amount for amount in self.values()
if abs(amount.number) >= tolerance
(amount for amount in self.values() if abs(amount.number) >= tolerance),
tolerance,
)
@staticmethod