a
    /§»a1  ã                   @   s,   d Z ddlZddlmZmZmZ dd„ ZdS )z
Call loop machinery
é    Né   )ÚHookCallErrorÚ_ResultÚ_raise_wrapfailc                    sî  d}g }d}�z\g }zÊt |ƒD ]¼}z‡ fdd„|jD ƒ}	W n4 tyn   |jD ]}
|
ˆ vrNtd|
›�ƒ‚qNY n0 |jr¶z |j|	Ž }t|ƒ | |¡ W qÚ ty²   t	|dƒ Y qÚ0 q|j|	Ž }|dur| |¡ |r qÜqW n t
yø   t ¡ }Y n0 W |�rt|�r|d nd|ƒ}n
t||ƒ}t |ƒD ]4}z| |¡ t	|dƒ W n t�y^   Y n0 �q.| ¡ S |�rŒt|�r‚|d nd|ƒ}n
t||ƒ}t |ƒD ]4}z| |¡ t	|dƒ W n t�yÎ   Y n0 �qž| ¡      Y S 0 dS )	z’Execute a call into multiple python functions/methods and return the
    result(s).

    ``caller_kwargs`` comes from _HookCaller.__call__().
    TNc                    s   g | ]}ˆ | ‘qS © r   )Ú.0Úargname©Úcaller_kwargsr   úI/home/yuhw/wc/pochoir/venv/lib/python3.9/site-packages/pluggy/_callers.pyÚ
<listcomp>   ó    z_multicall.<locals>.<listcomp>z hook call must provide argument zdid not yieldr   zhas second yield)ÚreversedÚargnamesÚKeyErrorr   ZhookwrapperÚfunctionÚnextÚappendÚStopIterationr   ÚBaseExceptionÚsysÚexc_infor   ÚsendZ
get_result)Ú	hook_nameZ
hook_implsr
   ZfirstresultZ__tracebackhide__ÚresultsÚexcinfoZ	teardownsZ	hook_implÚargsr   ÚgenÚresÚoutcomer   r	   r   Ú
_multicall	   sb    
ÿ






ó


r    )Ú__doc__r   Z_resultr   r   r   r    r   r   r   r   Ú<module>   s   