refactor: make compatibility exports ruff clean
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .shared import *
|
||||
from .shared import (
|
||||
Any,
|
||||
datetime,
|
||||
db,
|
||||
fail,
|
||||
now_iso,
|
||||
ok,
|
||||
re,
|
||||
row_to_dict,
|
||||
)
|
||||
|
||||
RULE_FIELDS = {"merchant", "counterparty", "description", "payment_method", "raw_summary", "branch", "memo"}
|
||||
RULE_MATCH_TYPES = {"contains", "equals", "regex", "starts_with", "ends_with"}
|
||||
@@ -68,11 +77,11 @@ def _rule_matches(rule: dict[str, Any], tx: dict[str, Any]) -> bool:
|
||||
|
||||
|
||||
from .category_rules_write_services import (
|
||||
create_category_rule,
|
||||
create_ledger_category,
|
||||
delete_category_rule,
|
||||
delete_ledger_category,
|
||||
update_category_rule,
|
||||
create_category_rule as create_category_rule,
|
||||
create_ledger_category as create_ledger_category,
|
||||
delete_category_rule as delete_category_rule,
|
||||
delete_ledger_category as delete_ledger_category,
|
||||
update_category_rule as update_category_rule,
|
||||
)
|
||||
|
||||
|
||||
@@ -275,11 +284,11 @@ def apply_categorization_rules(limit: int = 1000, only_uncategorized: bool = Tru
|
||||
return ok(applied_count=applied, preview=preview)
|
||||
|
||||
from .uncategorized_workbench_service import (
|
||||
apply_uncategorized_group_recommendation,
|
||||
apply_uncategorized_recommendation,
|
||||
get_uncategorized_merchant_summary,
|
||||
get_uncategorized_workbench,
|
||||
list_uncategorized_transactions,
|
||||
apply_uncategorized_group_recommendation as apply_uncategorized_group_recommendation,
|
||||
apply_uncategorized_recommendation as apply_uncategorized_recommendation,
|
||||
get_uncategorized_merchant_summary as get_uncategorized_merchant_summary,
|
||||
get_uncategorized_workbench as get_uncategorized_workbench,
|
||||
list_uncategorized_transactions as list_uncategorized_transactions,
|
||||
)
|
||||
|
||||
DEFAULT_LEDGER_CATEGORIES: list[dict[str, Any]] = [
|
||||
|
||||
Reference in New Issue
Block a user