Skip to content

Commit

Permalink
Lint to make checks pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
5Ub-Z3r0 committed Aug 28, 2023
1 parent 42a9c80 commit e0ddf40
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/tariochbctools/importers/swisscard/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class SwisscardImporter(identifier.IdentifyMixin, importer.ImporterProtocol):
"""An importer for Swisscard's cashback CSV files."""

def __init__(self, regexps, account):
identifier.IdentifyMixin.__init__(
self, matchers=[("filename", regexps)])
identifier.IdentifyMixin.__init__(self, matchers=[("filename", regexps)])
self.account = account

def name(self):
Expand All @@ -31,8 +30,7 @@ def extract(self, file, existing_entries):
skipinitialspace=True,
)
for row in reader:
book_date = parse(
row["Transaction date"].strip(), dayfirst=True).date()
book_date = parse(row["Transaction date"].strip(), dayfirst=True).date()
amt = amount.Amount(-D(row["Amount"]), row["Currency"])
metakv = {
"category": row["Category"],
Expand All @@ -48,8 +46,7 @@ def extract(self, file, existing_entries):
data.EMPTY_SET,
data.EMPTY_SET,
[
data.Posting(self.account, amt,
None, None, None, None),
data.Posting(self.account, amt, None, None, None, None),
],
)
entries.append(entry)
Expand Down

0 comments on commit e0ddf40

Please sign in to comment.