
    u(f!                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr  SSKJr  \\\   \\
\   4   r\" S5      r " S S\5      r\ " S S\	\   5      5       r\rg)z"
Hook wrapper "result" utilities.
    )annotations)TracebackType)Callable)cast)final)Generic)Optional)Tuple)Type)TypeVar
ResultTypec                      \ rS rSrSrSrg)HookCallError   zHook was called incorrectly. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       0/usr/lib/python3/dist-packages/pluggy/_result.pyr   r      s    &r   r   c                      \ rS rSrSrSr      SS jr\SS j5       r\SS j5       r	\
SS j5       rSS jrSS	 jrSS
 jrSrg)Result   zUAn object used to inspect and set the result in a :ref:`hook wrapper
<hookwrappers>`._result
_exceptionc                    Xl         X l        g:meta private:Nr   )selfresult	exceptions      r   __init__Result.__init__!   s     #r   c                P    U R                   nUc  g[        U5      XR                  4$ r!   )r   type__traceback__)r#   excs     r   excinfoResult.excinfo*   s*     oo;Is$5$566r   c                    U R                   $ )r"   )r   )r#   s    r   r%   Result.exception3   s     r   c                ^    SnS=p4 U" 5       nU " X45      $ ! [          a  nUn SnANSnAff = f)r"   TN)BaseException)clsfunc__tracebackhide__r$   r%   r+   s         r   	from_callResult.from_call8   sB     !!!	VF 6%%  	I	s    
,',c                    Xl         SU l        g)a  Force 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.

This overrides any previous result or exception.
Nr   )r#   r$   s     r   force_resultResult.force_resultC   s     r   c                    SU l         Xl        g)zxForce the result to fail with ``exception``.

This overrides any previous result or exception.

.. versionadded:: 1.1.0
Nr   )r#   r%   s     r   force_exceptionResult.force_exceptionO   s     #r   c                    SnU R                   nUc  [        [        U R                  5      $ UR	                  UR
                  5      e)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   r   r   with_tracebackr*   )r#   r4   r+   s      r   
get_resultResult.get_resultY   s@     !oo;
DLL11$$S%6%677r   )r   r   N)r$   zResultType | Noner%   BaseException | NonereturnNone)rB   z_ExcInfo | None)rB   rA   )r3   zCallable[[], ResultType]rB   zResult[ResultType])r$   r   rB   rC   )r%   r1   rB   rC   )rB   r   )r   r   r   r   r   	__slots__r&   propertyr,   r%   classmethodr5   r8   r;   r?   r   r   r   r   r   r      sz     *I$!$ ($ 
	$ 7 7   & &
$8r   r   N)r   
__future__r   typesr   typingr   r   r   r   r	   r
   r   r   r1   _ExcInfor   	Exceptionr   r   _Resultr   r   r   <module>rM      s    #          m$mXm5LLM\"
'I ' I8WZ  I8 I8Z r   