Skip to content

Commit

Permalink
[Revolut] Better comparison with ZERO
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarogarcia7 committed Jul 27, 2024
1 parent 928b84d commit ec38f57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tariochbctools/importers/revolut/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from io import StringIO

from beancount.core import amount, data
from beancount.core.number import D
from beancount.core.number import ZERO, D
from beancount.ingest import importer
from beancount.ingest.importers.mixins import identifier
from dateutil.parser import parse
Expand Down Expand Up @@ -103,5 +103,5 @@ def extract(self, file, existing_entries):
return entries

@staticmethod
def _is_non_zero(raw):
return abs(float(raw) - 0.00) > 1e-9
def is_non_zero(raw):
return raw != ZERO

0 comments on commit ec38f57

Please sign in to comment.