§
    s
Êj  ã                  ó  — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 dd	lmZ eee         ee
e         f         Z ed
¦  «        Z G d„ de¦  «        Ze G d„ de	e         ¦  «        ¦   «         ZeZdS )z"
Hook wrapper "result" utilities.
é    )Úannotations)ÚTracebackType)ÚCallable)Úcast)Úfinal)ÚGeneric)ÚOptional)ÚTypeVarÚ
ResultTypec                  ó   — e Zd ZdZdS )ÚHookCallErrorzHook was called incorrectly.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    ú>C:\Projects\Muse2API\.venv\Lib\site-packages\pluggy/_result.pyr   r      s   € € € € € Ø&Ð&Ð&Ð&r   r   c                  ó~   — e Zd ZdZdZdd	„Zedd„¦   «         Zedd„¦   «         Ze	dd„¦   «         Z
dd„Zdd„Zdd„ZdS )ÚResultzYAn object used to inspect and set the result in a :ref:`hook wrapper
    <hookwrappers>`.©Ú_resultÚ
_exceptionÚ
_tracebackÚresultúResultType | NoneÚ	exceptionúBaseException | NoneÚreturnÚNonec                óB   — || _         || _        |�|j        nd| _        dS ©ú:meta private:N©r   r   Ú__traceback__r   )Úselfr   r   s      r   Ú__init__zResult.__init__   s+   € ð ˆŒØ#ˆŒà5>Ð5J˜)Ô1Ð1ÐPTˆŒˆˆr   ú_ExcInfo | Nonec                óF   — | j         }|€dS t          |¦  «        || j        fS r"   )r   Útyper   )r&   Úexcs     r   ÚexcinfozResult.excinfo*   s*   € ð ŒoˆØˆ;Ø�4å˜‘I”I˜s D¤OÐ4Ð4r   c                ó   — | j         S )r#   )r   )r&   s    r   r   zResult.exception3   s   € ð ŒÐr   ÚfuncúCallable[[], ResultType]úResult[ResultType]c                óp   — d}dx}}	  |¦   «         }n# t           $ r}|}Y d}~nd}~ww xY w | ||¦  «        S )r#   TN)ÚBaseException)Úclsr.   Ú__tracebackhide__r   r   r+   s         r   Ú	from_callzResult.from_call8   sf   € ð !ÐØ!Ð!ˆ�ð	Ø�T‘V”VˆFˆFøÝð 	ð 	ð 	ØˆIˆIˆIˆIˆIˆIøøøøð	øøøàˆs�6˜9Ñ%Ô%Ð%s   ˆ
 “
)�$¤)r   c                ó0   — || _         d| _        d| _        dS )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_resultzResult.force_resultC   s   € ð ˆŒØˆŒØˆŒˆˆr   r2   c                óB   — d| _         || _        |�|j        nd| _        dS )z�Force the result to fail with ``exception``.

        This overrides any previous result or exception.

        .. versionadded:: 1.1.0
        Nr$   )r&   r   s     r   Úforce_exceptionzResult.force_exceptionP   s+   € ð ˆŒØ#ˆŒØ5>Ð5J˜)Ô1Ð1ÐPTˆŒˆˆr   c                ó„   — d}| j         }| j        }|€t          t          | j        ¦  «        S |                     |¦  «        ‚)z®Get 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_resultzResult.get_result[   sC   € ð !ÐØŒoˆØŒ_ˆØˆ;Ý�
 D¤LÑ1Ô1Ð1à×$Ò$ RÑ(Ô(Ð(r   N)r   r   r   r   r   r    )r   r(   )r   r   )r.   r/   r   r0   )r   r   r   r    )r   r2   r   r    )r   r   )r   r   r   r   Ú	__slots__r'   Úpropertyr,   r   Úclassmethodr5   r7   r9   r=   r   r   r   r   r      sÝ   € € € € € ðð ð 8€Ið	Uð 	Uð 	Uð 	Uð ð5ð 5ð 5ñ „Xð5ð ðð ð ñ „Xðð ð&ð &ð &ñ „[ð&ðð ð ð ð	Uð 	Uð 	Uð 	Uð)ð )ð )ð )ð )ð )r   r   N)r   Ú
__future__r   Útypesr   Útypingr   r   r   r   r	   r
   Útupler*   r2   Ú_ExcInfor   Ú	Exceptionr   r   Ú_Resultr   r   r   ú<module>rH      sF  ððð ð #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ð ��mÔ$ m°X¸mÔ5LÐLÔM€ØˆW�\Ñ"Ô"€
ð'ð 'ð 'ð 'ð '�Iñ 'ô 'ð 'ð ðN)ð N)ð N)ð N)ð N)ˆW�ZÔ ñ N)ô N)ñ „ðN)ðd €€€r   