
    	Ae                     @    d Z ddlZd Z G d de      Z G d d      Zy)z"
Hook wrapper "result" utilities.
    Nc                 z    | j                   }t        d|j                  |j                  |j                  |fz        )Nzwrap_controller at %r %s:%d %s)gi_codeRuntimeErrorco_nameco_filenameco_firstlineno)wrap_controllermsgcos      .lib/python3.12/site-packages/pluggy/_result.py_raise_wrapfailr      s<    		 	 B
(::r~~r'8'8#
>	?     c                       e Zd ZdZy)HookCallErrorzHook was called wrongly.N)__name__
__module____qualname____doc__ r   r   r   r      s    "r   r   c                   >    e Zd Zd Zed        Zed        Zd Zd Z	y)_Resultc                      || _         || _        y N_result_excinfo)selfresultexcinfos      r   __init__z_Result.__init__   s    r   c                     | j                   S r   )r   )r   s    r   r   z_Result.excinfo   s    }}r   c                 v    d}d x}}	  |       } | ||      S # t         $ r t        j                         }Y (w xY w)NT)BaseExceptionsysexc_info)clsfunc__tracebackhide__r   r   s        r   	from_callz_Result.from_call   sI     	%VF 67##  	%llnG	%s    88c                      || _         d| _        y)zForce the result(s) to ``result``.

        If the hook was marked as a ``firstresult`` a single value should
        be set otherwise set a (modified) list of results. Any exceptions
        found during invocation will be deleted.
        Nr   )r   r   s     r   force_resultz_Result.force_result'   s     r   c                 |    d}| j                   | j                  S | j                   }|d   j                  |d         )zGet the result(s) for this hook call.

        If the hook was marked as a ``firstresult`` only a single value
        will be returned otherwise a list of results.
        T      )r   r   with_traceback)r   r(   exs      r   
get_resultz_Result.get_result1   s@     !== <<BQ%&&r!u--r   N)
r   r   r   r    propertyr   classmethodr)   r+   r1   r   r   r   r   r      s9        $ $.r   r   )r   r$   r   	Exceptionr   r   r   r   r   <module>r5      s*    #I #). ).r   