Fix flake8 warnings
This commit is contained in:
parent
d7bdafa62a
commit
26cf921a6f
@ -65,7 +65,8 @@ class Interactive:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if other.startswith("note:"):
|
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())
|
next.note = Note(other[len("note:") :].strip())
|
||||||
else:
|
else:
|
||||||
ct = other.split(":")
|
ct = other.split(":")
|
||||||
|
|||||||
@ -54,7 +54,6 @@ groups = {
|
|||||||
|
|
||||||
|
|
||||||
def categorize_data(db: DatabaseClient):
|
def categorize_data(db: DatabaseClient):
|
||||||
|
|
||||||
# 1st) Classifying null transactions, i.e. transfers between banks.
|
# 1st) Classifying null transactions, i.e. transfers between banks.
|
||||||
# Will not overwrite previous categories
|
# Will not overwrite previous categories
|
||||||
nulls(db)
|
nulls(db)
|
||||||
@ -77,7 +76,8 @@ def categorize_data(db: DatabaseClient):
|
|||||||
# 4th) Manually update categories from the uncategorized transactions
|
# 4th) Manually update categories from the uncategorized transactions
|
||||||
if transactions := db.get_uncategorized_transactions():
|
if transactions := db.get_uncategorized_transactions():
|
||||||
print(
|
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:
|
for transaction in transactions:
|
||||||
while True:
|
while True:
|
||||||
@ -88,7 +88,8 @@ def categorize_data(db: DatabaseClient):
|
|||||||
break
|
break
|
||||||
if category not in categories:
|
if category not in categories:
|
||||||
print(
|
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:
|
else:
|
||||||
transaction.category = category
|
transaction.category = category
|
||||||
|
|||||||
@ -270,7 +270,8 @@ class Manager:
|
|||||||
row["date"], row["description"], row["amount"]
|
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 _:
|
case _:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
@ -141,7 +141,8 @@ ORDER BY date ASC
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
ADD_BANK = """
|
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 = """
|
DELETE_BANK = """
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user