
    JAi                        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  \\\   \\
\   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)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       J/var/www/html/land-ocr/venv/lib/python3.13/site-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
_exception
_tracebackc                T    Xl         X l        Ub  UR                  U l        gSU l        g:meta private:Nr   r   __traceback__r   )selfresult	exceptions      r   __init__Result.__init__   s'     #5>5J)11PTr   c                P    U R                   nUc  g[        U5      XR                  4$ r    )r   typer   )r$   excs     r   excinfoResult.excinfo*   s(     oo;IsOO44r   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        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                V    SU l         Xl        Ub  UR                  U l        gSU 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_exceptionP   s)     #5>5J)11PTr   c                    SnU R                   nU R                  nUc  [        [        U R                  5      $ UR                  U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   r   with_traceback)r$   r4   r+   tbs       r   
get_resultResult.get_result[   sC     !oo__;
DLL11$$R((r   )r   r   r   N)r%   zResultType | Noner&   BaseException | NonereturnNone)rC   z_ExcInfo | None)rC   rB   )r3   zCallable[[], ResultType]rC   zResult[ResultType])r%   r   rC   rD   )r&   r1   rC   rD   )rC   r   )r   r   r   r   r   	__slots__r'   propertyr,   r&   classmethodr5   r8   r;   r@   r   r   r   r   r   r      s     8I	U!	U (	U 
		U 5 5   & &	U)r   r   N)r   
__future__r   typesr   typingr   r   r   r   r	   r
   tupler*   r1   _ExcInfor   	Exceptionr   r   _Resultr   r   r   <module>rO      s    #        m$mXm5LLM\"
'I ' N)WZ  N) N)d r   