{f ^dZddlZddlmZddlmZddgiZgdZGd d eZ d Z e Ze Z y) z Asynchronous progressbar decorator for iterators. Includes a default `range` iterator printing to `stderr`. Usage: >>> from tqdm.asyncio import trange, tqdm >>> async for i in trange(10): ... ... N) version_info)tqdmz github.com/ casperdcl) tqdm_asynciotarangertrangecjeZdZdZd fd ZdZdZdZedddddZ eddddd Z xZ S) rz0 Asynchronous-friendly version of tqdm. Nct||g|i|d|_|ot|dr|j|_d|_yt|dr|j |_yt||_|jj |_yy)NF __anext__T__next__) super__init__iterable_awaitablehasattrr iterable_nextr iteriterable_iterator)selfiterableargskwargs __class__s U/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/tqdm/asyncio.pyrztqdm_asyncio.__init__s 3D3F3"'  x-%-%7%7"*.':.%-%6%6")-h&%)%;%;%D%D" c|SN)rs r __aiter__ztqdm_asyncio.__aiter__$s rcK |jr|jd{}n|j}|j|S7'#t$r|j t t $r|j wxYwwr)rrupdate StopIterationcloseStopAsyncIteration BaseException)rress rr ztqdm_asyncio.__anext__'sy && ..00((* KKMJ 1  % JJL$ $  JJL  s,B A A &A B  A 9BB c:|jj|i|Sr)rsend)rrrs rr(ztqdm_asyncio.send6s!t}}!!42622rlooptimeouttotalc+K| t|}i}tdddkr||d<|tj|fd|i|fd|i|Ed{y7w)z5 Wrapper for `asyncio.as_completed`. N) r*r+r,)lenrasyncio as_completed)clsfsr*r+r, tqdm_kwargsrs rr3ztqdm_asyncio.as_completed9sl =GE  g %!F6Nw++BJJ6J3"3&13 3 3sAAA AcKd}t|Dcgc]\}}|||} }}|j| f|||d|Dcgc] }|d{} }t| D cgc]\} }| c}} Scc}}w7,cc}wcc}} ww)z/ Wrapper for `asyncio.gather`. c&K||d{fS7wrr)ifs rwrap_awaitablez+tqdm_asyncio.gather..wrap_awaitableKsAg: gs r)N) enumerater3sorted) r4r*r+r,r5r6r;r9r:ifsr&_s rgatherztqdm_asyncio.gatherFs  1:" >1~a#>> 0 0 0!M47<!M@K!MN1QwwNN$Sk*da**?N*s?BA4B A< A: A<B$ B0 B:A<< Br) __name__ __module__ __qualname____doc__rrr r( classmethodr3r@ __classcell__)rs@rrrsS E 3&*D 3 3$($d + +rrc&tt|fi|S)zE A shortcut for `tqdm.asyncio.tqdm(range(*args), **kwargs)`. )rrange)rrs rrrTs t / //r) rDr2sysrstdrstd_tqdm __author____all__rrr rrrrNsD!k] + 7>+8>+B0 r