refactor: make compatibility exports ruff clean
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .shared import *
|
||||
from .shared import (
|
||||
Any,
|
||||
BACKUP_RESTORE_POLICY,
|
||||
CASHFLOW_KIND_SQL,
|
||||
DEFAULT_LEDGER_BACKUP_DIR,
|
||||
KST,
|
||||
Path,
|
||||
current_kst_month,
|
||||
datetime,
|
||||
db,
|
||||
fail,
|
||||
hashlib,
|
||||
init_db,
|
||||
ok,
|
||||
resolve_db_path,
|
||||
row_to_dict,
|
||||
sqlite3,
|
||||
timedelta,
|
||||
)
|
||||
from .shared import _current_kst_datetime, _month_range
|
||||
|
||||
def health_check(db_path: str | None = None) -> dict[str, Any]:
|
||||
@@ -166,7 +184,7 @@ def get_ledger_backup_status(file_path: str, include_hash: bool = True, include_
|
||||
return fail("not_found", f"backup file not found: {path}", path=str(path), exists=False)
|
||||
return ok(backup=_ledger_db_status_for_path(path, include_hash=include_hash, include_integrity=include_integrity), restore_policy=BACKUP_RESTORE_POLICY)
|
||||
|
||||
from .accounts_write_services import create_ledger_account
|
||||
from .accounts_write_services import create_ledger_account as create_ledger_account
|
||||
|
||||
def list_ledger_accounts(active_only: bool = True, db_path: str | None = None) -> dict[str, Any]:
|
||||
sql = "SELECT * FROM accounts" + (" WHERE active=1" if active_only else "") + " ORDER BY name"
|
||||
|
||||
Reference in New Issue
Block a user