Skip to content

Commit

Permalink
Fixes from pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarogarcia7 authored Aug 5, 2024
1 parent c758eae commit 76e9737
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/tariochbctools/importers/revolut/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,17 @@ def extract(self, file, existing_entries):
]
description = row["Description"].strip()
if is_fee_mode:
postings = [data.Posting(self.account, fee, None, None, None, None),
data.Posting(
self._fee["account"], -fee, None, None, None, None
)]
postings = [
data.Posting(self.account, fee, None, None, None, None),
data.Posting(
self._fee["account"], -fee, None, None, None, None
),
]
description = f"Fees for {description}"

assert isinstance(description, str), "Actual type of description is " + str(type(description))
assert isinstance(
description, str
), "Actual type of description is " + str(type(description))

entry = data.Transaction(
data.new_metadata(file.name, 0, {}),
Expand All @@ -88,7 +92,7 @@ def extract(self, file, existing_entries):
postings,
)
entries.append(entry)

if not is_fee_mode:
# only add balance after the last (newest) transaction
try:
Expand Down

0 comments on commit 76e9737

Please sign in to comment.