Fix flake8 warnings

This commit is contained in:
Luís Murta 2023-04-13 18:38:07 +01:00
parent d7bdafa62a
commit 26cf921a6f
Signed by: satprog
GPG Key ID: 169EF1BBD7049F94
5 changed files with 13 additions and 6 deletions

3
.flake8 Normal file
View File

@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203

View File

@ -65,7 +65,8 @@ class Interactive:
continue
if other.startswith("note:"):
# TODO adding notes to a splitted transaction won't allow categorization
# TODO adding notes to a splitted transaction won't allow
# categorization
next.note = Note(other[len("note:") :].strip())
else:
ct = other.split(":")

View File

@ -54,7 +54,6 @@ groups = {
def categorize_data(db: DatabaseClient):
# 1st) Classifying null transactions, i.e. transfers between banks.
# Will not overwrite previous categories
nulls(db)
@ -77,7 +76,8 @@ def categorize_data(db: DatabaseClient):
# 4th) Manually update categories from the uncategorized transactions
if transactions := db.get_uncategorized_transactions():
print(
f"Still {len(transactions)} uncategorized transactions left. Type quit/exit to exit the program."
f"Still {len(transactions)} uncategorized transactions left. Type quit/exit"
"to exit the program."
)
for transaction in transactions:
while True:
@ -88,7 +88,8 @@ def categorize_data(db: DatabaseClient):
break
if category not in categories:
print(
f"Category {category} doesn't exist. Please use one of {categories.keys()}"
f"Category {category} doesn't exist. Please use one of"
f"{categories.keys()}"
)
else:
transaction.category = category

View File

@ -270,7 +270,8 @@ class Manager:
row["date"], row["description"], row["amount"]
)
# TODO case "split" how to match to original transaction?? also save ids?
# TODO case "split" how to match to original transaction?? also
# save ids?
case _:
continue

View File

@ -141,7 +141,8 @@ ORDER BY date ASC
"""
ADD_BANK = """
INSERT INTO banks (name, bic, nordigen_id, nordigen_name, requisition_id, invert) values (?,?,?,?,?,?)
INSERT INTO banks (name, bic, nordigen_id, nordigen_name, requisition_id, invert)
values (?,?,?,?,?,?)
"""
DELETE_BANK = """