From 0035a42a25d0f0f13b3cfa71c85019e71f3c8ebb Mon Sep 17 00:00:00 2001 From: Patrick Ruckstuhl Date: Sun, 29 May 2022 11:16:58 +0000 Subject: [PATCH] formatting fixes --- .../importers/revolut/importer.py | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/src/tariochbctools/importers/revolut/importer.py b/src/tariochbctools/importers/revolut/importer.py index 29f0cb2..b35394c 100644 --- a/src/tariochbctools/importers/revolut/importer.py +++ b/src/tariochbctools/importers/revolut/importer.py @@ -31,19 +31,17 @@ 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, ) @@ -51,8 +49,6 @@ def extract(self, file, existing_entries): for row in reader: metakv = {} - - try: bal = D(row["Balance"].replace("'", "").strip()) amount_raw = D(row["Amount"].replace("'", "").strip()) @@ -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