Fix flake8 warnings
This commit is contained in:
parent
d7bdafa62a
commit
26cf921a6f
@ -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(":")
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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 = """
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user