Skip to content

Commit

Permalink
formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tarioch committed May 29, 2022
1 parent 24c5b86 commit 0035a42
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions src/tariochbctools/importers/revolut/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,24 @@ def extract(self, file, existing_entries):
reader = csv.DictReader(
csvfile,
[
"Type",
"Product",
"Started Date",
"Completed Date",
"Description",
"Amount",
"Fee",
"Currency",
"State",
"Balance",

"Type",
"Product",
"Started Date",
"Completed Date",
"Description",
"Amount",
"Fee",
"Currency",
"State",
"Balance",
],

delimiter=",",
skipinitialspace=True,
)
next(reader)
for row in reader:
metakv = {}



try:
bal = D(row["Balance"].replace("'", "").strip())
amount_raw = D(row["Amount"].replace("'", "").strip())
Expand Down Expand Up @@ -81,9 +77,7 @@ def extract(self, file, existing_entries):
# only add balance after the last (newest) transaction
try:
book_date = book_date + timedelta(days=1)
entry = data.Balance(
meta, book_date, self.account, balance, None, None
)
entry = data.Balance(meta, book_date, self.account, balance, None, None)
entries.append(entry)
except NameError:
pass
Expand Down

0 comments on commit 0035a42

Please sign in to comment.