Skip to content

Commit 191bb74

Browse files
authored
Replace tqdm with tldm for progress tracking
1 parent 85dbbf3 commit 191bb74

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

sqlite_export_for_ynab/_main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from urllib.parse import urlunparse
2121

2222
import aiohttp
23-
from tqdm import tqdm
23+
from tldm import tldm
2424

2525
from sqlite_export_for_ynab import ddl
2626

@@ -125,7 +125,7 @@ async def sync(token: str, db: Path, full_refresh: bool) -> None:
125125
print("Fetching budget data...")
126126
lkos = get_last_knowledge_of_server(cur)
127127
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:
129129
yc = ProgressYnabClient(YnabClient(token, session), pbar)
130130

131131
account_jobs = jobs(yc, "accounts", budget_ids, lkos)
@@ -300,7 +300,7 @@ def insert_payees(
300300
if not payees:
301301
return
302302

303-
for payee in tqdm(payees, desc="Payees"):
303+
for payee in tldm(payees, desc="Payees"):
304304
insert_entry(cur, "payees", budget_id, payee)
305305

306306

@@ -411,7 +411,7 @@ def insert_nested_entries(
411411
if not entries:
412412
return
413413

414-
with tqdm(
414+
with tldm(
415415
total=sum(1 + len(e[subentries_name]) for e in entries),
416416
desc=desc,
417417
) as pbar:
@@ -471,7 +471,7 @@ async def __call__(
471471
@dataclass
472472
class ProgressYnabClient:
473473
yc: YnabClient
474-
pbar: tqdm[Never]
474+
pbar: tldm[Never]
475475

476476
async def __call__(
477477
self, path: str, last_knowledge_of_server: int | None = None

0 commit comments

Comments
 (0)