0x1949 Team - FAZEMRX - MANAGER
Edit File: async_utils.cpython-310.pyc
o F��a� � @ s� d dl Z d dlZd dlmZ ddlmZ ddlmZ e�d�Z dd� Z eee eeeeed�hZd ejejd df d dfdd�Z ddd�Zd dd ejd fdd�ZdS )� N)�wraps� )�_PassArg)�pass_eval_context�Vc s � fdd�}|S )Nc sv t ���}|d u �|t ju rdtjdtfdd��n dtjdtfdd��t��� ���fdd��}�r6t|�}d|_|S ) N�args�returnc S s t �t| d j�S �Nr )�t�cast�bool�is_async�r � r �4/usr/lib/python3/dist-packages/jinja2/async_utils.pyr s z2async_variant.<locals>.decorator.<locals>.is_asyncc S s t �t| d jj�S r )r r r �environmentr r r r r r s c s8 �| �}�r| dd � } |r� | i |��S �| i |��S )Nr r )r �kwargs�b)� async_funcr �need_eval_context�normal_funcr r �wrapper s z1async_variant.<locals>.decorator.<locals>.wrapperT) r �from_objr r �Anyr r r �jinja_async_variant)r �pass_argr �r )r r r r � decorator s z async_variant.<locals>.decoratorr )r r r r r � async_variant s r �valuer c � sB �t | �tv r t�d| �S t�| �rt�d| �I d H S t�d| �S )Nr zt.Awaitable[V])�type�_common_primitivesr r �inspect�isawaitable�r r r r � auto_await2 s � r% �iterable�*t.Union[t.AsyncIterable[V], t.Iterable[V]]�t.AsyncIterator[V]c C sN �t | d�rt�d| �2 z 3 d H W }|V q6 d S t�d| �D ]}|V qd S )N� __aiter__zt.AsyncIterable[V]z t.Iterable[V])�hasattrr r )r&