HEX
Server: LiteSpeed
System: Linux osault1.hostarmada.net 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP Thu May 7 23:17:13 UTC 2026 x86_64
User: tucom (1048)
PHP: 8.4.24
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.6/site-packages/tqdm/__pycache__/asyncio.cpython-36.pyc
3

	LBj�
�@s^dZddlZddlmZddlmZddgiZdd	d
dgZGdd�de�Z	d
d	�Z
e	Ze
ZdS)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�)�tqdmzgithub.com/Z	casperdcl�tqdm_asyncio�taranger�trangecsfeZdZdZd�fdd�	Zdd�Zdd�Zd	d
�Zedddd�dd
��Z	edddd�dd��Z
�ZS)rz>
    Asynchronous-friendly version of tqdm (Python 3.6+).
    Ncsltt|�j|f|�|�d|_|dk	rht|d�r@|j|_d|_n(t|d�rT|j|_nt|�|_	|j	j|_dS)NF�	__anext__T�__next__)
�superr�__init__�iterable_awaitable�hasattrr�
iterable_nextr	�iterZiterable_iterator)�self�iterable�args�kwargs)�	__class__��,/tmp/pip-build-44150kxb/tqdm/tqdm/asyncio.pyrs



ztqdm_asyncio.__init__cCs|S)Nr)rrrr�	__aiter__$sztqdm_asyncio.__aiter__c�sly*|jr|j�IdH}n|j�}|j�|Stk
rJ|j�t�Yntk
rf|j��YnXdS)N)rr�update�
StopIteration�close�StopAsyncIteration�
BaseException)r�resrrrr'sztqdm_asyncio.__anext__cOs|jj||�S)N)r�send)rrrrrrr6sztqdm_asyncio.send)�loop�timeout�totalcks\|dkrt|�}i}tdd�dkr,||d<|tj|fd|i|��fd|i|��EdHdS)	z5
        Wrapper for `asyncio.as_completed`.
        N���
rr r!)r#r$)�lenr�asyncio�as_completed)�cls�fsrr r!�tqdm_kwargsrrrrr'9sztqdm_asyncio.as_completedc�sZdd���fdd�t|�D�}dd�|j|f|||d�|��D�IdH}dd�t|�D�S)	z/
        Wrapper for `asyncio.gather`.
        c�s||IdHfS)Nr)�i�frrr�wrap_awaitableKsz+tqdm_asyncio.gather.<locals>.wrap_awaitablecsg|]\}}�||��qSrr)�.0r+r,)r-rr�
<listcomp>Nsz'tqdm_asyncio.gather.<locals>.<listcomp>c�sg|]}|IdH�qS)Nr)r.r,rrrr/Os)rr r!NcSsg|]\}}|�qSrr)r.�_r+rrrr/Qs)�	enumerater'�sorted)r(rr r!r)r*Zifsrr)r-r�gatherFs
ztqdm_asyncio.gather)N)�__name__�
__module__�__qualname__�__doc__rrrr�classmethodr'r3�
__classcell__rr)rrrs
cOstt|�f|�S)zE
    A shortcut for `tqdm.asyncio.tqdm(range(*args), **kwargs)`.
    )r�range)rrrrrrTs)r7r&�sysrZstdrZstd_tqdm�
__author__�__all__rrrrrrr�<module>	s
A