|
20 | 20 | from urllib.parse import urlunparse |
21 | 21 |
|
22 | 22 | import aiohttp |
23 | | -from tqdm import tqdm |
| 23 | +from tldm import tldm |
24 | 24 |
|
25 | 25 | from sqlite_export_for_ynab import ddl |
26 | 26 |
|
@@ -125,7 +125,7 @@ async def sync(token: str, db: Path, full_refresh: bool) -> None: |
125 | 125 | print("Fetching budget data...") |
126 | 126 | lkos = get_last_knowledge_of_server(cur) |
127 | 127 | async with aiohttp.ClientSession() as session: |
128 | | - with tqdm(desc="Budget Data", total=len(budgets) * 5) as pbar: |
| 128 | + with tldm(desc="Budget Data", total=len(budgets) * 5) as pbar: |
129 | 129 | yc = ProgressYnabClient(YnabClient(token, session), pbar) |
130 | 130 |
|
131 | 131 | account_jobs = jobs(yc, "accounts", budget_ids, lkos) |
@@ -300,7 +300,7 @@ def insert_payees( |
300 | 300 | if not payees: |
301 | 301 | return |
302 | 302 |
|
303 | | - for payee in tqdm(payees, desc="Payees"): |
| 303 | + for payee in tldm(payees, desc="Payees"): |
304 | 304 | insert_entry(cur, "payees", budget_id, payee) |
305 | 305 |
|
306 | 306 |
|
@@ -411,7 +411,7 @@ def insert_nested_entries( |
411 | 411 | if not entries: |
412 | 412 | return |
413 | 413 |
|
414 | | - with tqdm( |
| 414 | + with tldm( |
415 | 415 | total=sum(1 + len(e[subentries_name]) for e in entries), |
416 | 416 | desc=desc, |
417 | 417 | ) as pbar: |
@@ -471,7 +471,7 @@ async def __call__( |
471 | 471 | @dataclass |
472 | 472 | class ProgressYnabClient: |
473 | 473 | yc: YnabClient |
474 | | - pbar: tqdm[Never] |
| 474 | + pbar: tldm[Never] |
475 | 475 |
|
476 | 476 | async def __call__( |
477 | 477 | self, path: str, last_knowledge_of_server: int | None = None |
|
0 commit comments