§
    4›j(  ã            	      ón  — U d Z ddlmZ ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ddl
Z
ddlmZ ddlZddlmZ dd	lmZ dd
lmZ ddlZej        dk    rddlmZ ej        j        ZdJd„Z G d„ dej        ¦  «        Zej        Zded<   dKd„ZdKd„Z dLd„Z!dMdNd"„Z"dOd$„Z#d%dd&œdPd-„Z$dQd.„Z%d/„  e&d0¦  «        D ¦   «         Z'e' (                     e)d1¦  «        d2 e)d3¦  «        d4 e)d5¦  «        d6i¦  «         dRd9„Z*d:„ Z+d;„ Z,dSd>„Z-dTd?„Z.dUdA„Z/ej        dBk    rddClm0Z0 ndVdF„Z0 G dG„ dH¦  «        Z1dWdI„Z2dS )Xz?Python version compatibility code and random general utilities.é    )Úannotations)ÚCallableN)Ú	Parameter)Ú	Signature)ÚPath)ÚAny)ÚFinal)ÚNoReturn©é   é   )ÚFormatÚpathústr | os.PathLike[str]ÚreturnÚLEGACY_PATHc                ó    — t          | ¦  «        S )zBInternal wrapper to prepare lazy proxies for legacy_path instances)r   )r   s    úK/home/lighthouse/health/venv/lib/python3.11/site-packages/_pytest/compat.pyÚlegacy_pathr   #   s   € å�tÑÔÐó    c                  ó   — e Zd ZdZdS )Ú
NotSetTyper   N)Ú__name__Ú
__module__Ú__qualname__Útoken© r   r   r   r   +   s   € € € € € Ø€E€E€Er   r   r	   ÚNOTSETÚfuncÚobjectÚboolc                óL   — t          j        | ¦  «        pt          | dd¦  «        S )az  Return True if func is a coroutine function (a function defined with async
    def syntax, and doesn't contain yield), or a function decorated with
    @asyncio.coroutine.

    Note: copied and modified from Python 3.5's builtin coroutines.py to avoid
    importing asyncio directly, which in turns also initializes the "logging"
    module as a side-effect (see issue #8).
    Ú_is_coroutineF)ÚinspectÚiscoroutinefunctionÚgetattr©r   s    r   r%   r%   1   s&   € õ Ô& tÑ,Ô,ÐUµ¸¸oÈuÑ0UÔ0UÐUr   c                óH   — t          | ¦  «        pt          j        | ¦  «        S )zZReturn True if the given function seems to be an async function or
    an async generator.)r%   r$   Úisasyncgenfunctionr'   s    r   Úis_async_functionr*   =   s"   € õ ˜tÑ$Ô$ÐH­Ô(BÀ4Ñ(HÔ(HÐHr   ÚobjúCallable[..., Any]r   c                óŠ   — t           j        dk    r t          j        | t          j        ¬¦  «        S t          j        | ¦  «        S )z0Return signature without evaluating annotations.r   )Úannotation_format)ÚsysÚversion_infor$   Ú	signaturer   ÚSTRING©r+   s    r   r1   r1   C   s9   € å
Ô˜7Ò"Ð"ÝÔ  ½¼ÐFÑFÔFÐFÝÔ˜SÑ!Ô!Ð!r   Úcurdirústr | os.PathLike[str] | NoneÚstrc                óò   — t          | ¦  «        } t          t          j        | ¦  «        ¦  «        }| j        j        }|�0	 |                     |¦  «        }|› d|dz   › �S # t          $ r Y nw xY w|› d|dz   › �S )Nú:é   )Úget_real_funcr   r$   ÚgetfileÚ__code__Úco_firstlinenoÚrelative_toÚ
ValueError)Úfunctionr4   ÚfnÚlinenoÚrelfns        r   ÚgetlocationrD   J   s£   € Ý˜XÑ&Ô&€HÝ	�gŒo˜hÑ'Ô'Ñ	(Ô	(€BØÔÔ-€FØÐð	+Ø—N’N 6Ñ*Ô*ˆEð Ð*Ð*˜f q™jÐ*Ð*Ð*øõ ð 	ð 	ð 	ØˆDð	øøøð ÐÐ�6˜A‘:ÐÐÐs   Á A Á
A,Á+A,Úintc                óP  ‡‡— t          | dd¦  «        }|sdS t          t          j                             d¦  «        dt	          ¦   «         ¦  «        Št          t          j                             d¦  «        dt	          ¦   «         ¦  «        Št          ˆˆfd„|D ¦   «         ¦  «        S )z>Return number of arguments used up by mock arguments (if any).Ú	patchingsNr   ÚmockÚDEFAULTzunittest.mockc                óF   •— g | ]}|j         s|j        ‰u s	|j        ‰u ¯|‘ŒS r   )Úattribute_nameÚnew)Ú.0ÚpÚmock_sentinelÚut_mock_sentinels     €€r   ú
<listcomp>z'num_mock_patch_args.<locals>.<listcomp>b   sM   ø€ ð 	
ð 	
ð 	
àØÔ#ð	
ð ”˜-Ð'Ð'¨1¬5Ð4DÐ+DÐ+Dð ð ,EÐ+DÐ+Dr   )r&   r/   ÚmodulesÚgetr    Úlen)r@   rG   rO   rP   s     @@r   Únum_mock_patch_argsrU   X   s¦   øø€ å˜ +¨tÑ4Ô4€IØð Øˆqå�CœKŸOšO¨FÑ3Ô3°YÅÁÄÑIÔI€MÝ�sœ{Ÿš¨Ñ?Ô?ÀÍFÉHÌHÑUÔUÐåð	
ð 	
ð 	
ð 	
ð 	
àð	
ñ 	
ô 	
ñô ð r   Ú )ÚnameÚclsr@   úCallable[..., object]rW   rX   útype | Noneútuple[str, ...]c               óô  — 	 t          | ¦  «        j                             ¦   «         }n7# t          t          f$ r#}ddlm}  |d| ›d|› �d¬¦  «         Y d}~nd}~ww xY wt          d„ |D ¦   «         ¦  «        }|s| j        }t          d	„ |D ¦   «         ¦  «        s6|r4t          t          j        ||d¬
¦  «        t          ¦  «        s
|dd…         }t          | d¦  «        r|t          | ¦  «        d…         }|S )a   Return the names of a function's mandatory arguments.

    Should return the names of all function arguments that:
    * Aren't bound to an instance or type as in instance or class methods.
    * Don't have default values.
    * Aren't bound with functools.partial.
    * Aren't replaced with mocks.

    The cls arguments indicate that the function should be treated as a bound
    method even though it's not unless the function is a static method.

    The name parameter should be the original name in which the function was collected.
    r   )Úfailz!Could not determine arguments of z: F)ÚpytraceNc              3  ó–   K  — | ]D}|j         t          j        u s|j         t          j        u r|j        t          j        u ¯;|j        V — ŒEd S ©N©Úkindr   ÚPOSITIONAL_OR_KEYWORDÚKEYWORD_ONLYÚdefaultÚemptyrW   ©rM   rN   s     r   ú	<genexpr>z"getfuncargnames.<locals>.<genexpr>‘   sa   è è € ð ð ààŒF•iÔ5Ð5Ð5ØŒv�Ô/Ð/Ð/àŒI�œÐ(Ð(ð 	
Œð )Ð(Ð(Ð(ðð r   c              3  ó<   K  — | ]}|j         t          j        u V — Œd S r`   )rb   r   ÚPOSITIONAL_ONLYrg   s     r   rh   z"getfuncargnames.<locals>.<genexpr>    s,   è è € ÐGÐG°qˆqŒv�Ô2Ð2ÐGÐGÐGÐGÐGÐGr   )re   r9   Ú__wrapped__)r1   Ú
parametersÚvaluesr?   Ú	TypeErrorÚ_pytest.outcomesr]   Útupler   ÚanyÚ
isinstancer$   Úgetattr_staticÚstaticmethodÚhasattrrU   )r@   rW   rX   rl   Úer]   Ú	arg_namess          r   Úgetfuncargnamesrx   k   sx  € ð8
Ý˜xÑ(Ô(Ô3×:Ò:Ñ<Ô<ˆ
ˆ
øÝ�	Ð"ð 
ð 
ð 
Ø)Ð)Ð)Ð)Ð)Ð)àˆØA°ÐAÐA¸aÐAÐAØð	
ñ 	
ô 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
øøøøð
øøøõ ð ð àðñ ô ñ ô €Ið ð !ØÔ ˆõ
 ÐGÐG¸JÐGÑGÔGÑGÔGð "ð 	ð"õ ÝÔ" 3¨°dÐ;Ñ;Ô;½\ñ
ô 
ð	"ð ˜a˜b˜b”Mˆ	åˆx˜Ñ'Ô'ð ?ØÕ1°(Ñ;Ô;Ð=Ð=Ô>ˆ	ØÐs   ‚&) ©AºAÁAc                ó|   — t          d„ t          | ¦  «        j                             ¦   «         D ¦   «         ¦  «        S )Nc              3  óˆ   K  — | ]=}|j         t          j        t          j        fv r|j        t          j        u¯4|j        V — Œ>d S r`   ra   rg   s     r   rh   z(get_default_arg_names.<locals>.<genexpr>³   sY   è è € ð ð àØŒ6•iÔ5µyÔ7MÐNÐNÐNØŒI�Yœ_Ð,Ð,ð 	
Œð -Ð,Ð,Ð,ð	ð r   )rp   r1   rl   rm   )r@   s    r   Úget_default_arg_namesr{   ¯   sI   € õ ð ð å˜8Ñ$Ô$Ô/×6Ò6Ñ8Ô8ðñ ô ñ ô ð r   c                ó@   — i | ]}|t          d d¦  «        v¯|d|d›�“ŒS )é    é   z\xÚ02x)Úrange)rM   Úis     r   ú
<dictcomp>r‚   »   s;   € ð (ð (ð (Ø¨AµU¸2¸s±^´^Ð,CÐ,C€A€}ˆQ€}€}€}Ð,CÐ,CÐ,Cr   é€   ú	z\túz\rú
z\nÚvalúbytes | strc                óÞ   — t          | t          ¦  «        r|                      dd¦  «        }n(|                      d¦  «                             d¦  «        }|                     t
          ¦  «        S )a	  If val is pure ASCII, return it as an str, otherwise, escape
    bytes objects into a sequence of escaped bytes:

    b'\xc3\xb4\xc5\xd6' -> r'\xc3\xb4\xc5\xd6'

    and escapes strings into a sequence of escaped unicode ids, e.g.:

    r'4\nV\U00043efa\x0eMXWB\x1e\u3028\u15fd\xcd\U0007d944'

    Note:
       The obvious "v.decode('unicode-escape')" will return
       valid UTF-8 unicode if it finds them in bytes, but we
       want to return escaped bytes for any byte, even if they match
       a UTF-8 string.
    ÚasciiÚbackslashreplaceÚunicode_escape)rr   ÚbytesÚdecodeÚencodeÚ	translateÚ$_non_printable_ascii_translate_table)r‡   Úrets     r   Úascii_escapedr“   Ã   s_   € õ  �#•uÑÔð ;Ø�jŠj˜Ð"4Ñ5Ô5ˆˆà�jŠjÐ)Ñ*Ô*×1Ò1°'Ñ:Ô:ˆØ�=Š=Õ=Ñ>Ô>Ð>r   c                óp   — t          j        | ¦  «        } t          | t          j        ¦  «        r| j        } | S )z{Get the real function object of the (possibly) wrapped object by
    :func:`functools.wraps`, or :func:`functools.partial`.)r$   Úunwraprr   Ú	functoolsÚpartialr   r3   s    r   r:   r:   Ú   s4   € õ Œ.˜Ñ
Ô
€Cå�#•yÔ(Ñ)Ô)ð ØŒhˆØ€Jr   c                ó6   — 	 | j         S # t          $ r | cY S w xY wr`   )Ú__func__ÚAttributeErrorr'   s    r   Ú	getimfuncr›   ä   s3   € ðØŒ}ÐøÝð ð ð Øˆˆˆðøøøs   ‚	 ‰—r   re   c                óL   — ddl m} 	 t          | ||¦  «        S # |$ r |cY S w xY w)aR  Like getattr but return default upon any Exception or any OutcomeException.

    Attribute access can potentially fail for 'evil' Python objects.
    See issue #214.
    It catches OutcomeException because of #2490 (issue #580), new outcomes
    are derived from BaseException instead of Exception (for more details
    check #2707).
    r   )ÚTEST_OUTCOME)ro   r�   r&   )r    rW   re   r�   s       r   Úsafe_getattrrž   ë   sQ   € ð .Ð-Ð-Ð-Ð-Ð-ðÝ�v˜t WÑ-Ô-Ð-øØð ð ð Øˆˆˆðøøøs   ˆ ™#¢#c                óN   — 	 t          j        | ¦  «        S # t          $ r Y dS w xY w)z0Ignore any exception via isinstance on Python 3.F)r$   ÚisclassÚ	Exceptionr3   s    r   Úsafe_isclassr¢   ü   s9   € ðÝŒ˜sÑ#Ô#Ð#øÝð ð ð Øˆuˆuðøøøs   ‚ –
$£$ú
int | Nonec                 ó„   — t           j        dk    st           j        dk    rdS d} t          j        ¦   «         }|| k    r|ndS )zšReturn the current process's real user id or None if it could not be
    determined.

    :return: The user id or None if it could not be determined.
    Úwin32Ú
emscriptenNéÿÿÿÿ)r/   ÚplatformÚosÚgetuid)ÚERRORÚuids     r   Úget_user_idr­     sH   € õ „|�wÒÐ¥#¤,°,Ò">Ð">ð ˆtð ˆÝŒi‰kŒkˆØ˜U’l�lˆsˆs¨Ð,r   )r   é   )Úassert_neverÚvaluer
   c                óH   — J d| › dt          | ¦  «        j        › d�¦   «         ‚)NFzUnhandled value: z (ú))Útyper   )r°   s    r   r¯   r¯     s-   € ØJÐJ¨%ÐJÐJµ4¸±;´;Ô3GÐJÐJÐJÑJÔJÐJr   c                  ó*   — e Zd ZdZd
d„Zdd„Zdd„Zd	S )ÚCallableBoola'  
    A bool-like object that can also be called, returning its true/false value.

    Used for backwards compatibility in cases where something was supposed to be a method
    but was implemented as a simple attribute by mistake (see `TerminalReporter.isatty`).

    Do not use in new code.
    r°   r!   r   ÚNonec                ó   — || _         d S r`   ©Ú_value)Úselfr°   s     r   Ú__init__zCallableBool.__init__+  s   € ØˆŒˆˆr   c                ó   — | j         S r`   r¸   ©rº   s    r   Ú__bool__zCallableBool.__bool__.  ó
   € ØŒ{Ðr   c                ó   — | j         S r`   r¸   r½   s    r   Ú__call__zCallableBool.__call__1  r¿   r   N)r°   r!   r   r¶   ©r   r!   )r   r   r   Ú__doc__r»   r¾   rÁ   r   r   r   rµ   rµ   !  sZ   € € € € € ðð ðð ð ð ðð ð ð ðð ð ð ð ð r   rµ   c                 ó<   — ddg} t          d„ | D ¦   «         ¦  «        S )z0Check if we're currently running on a CI system.ÚCIÚBUILD_NUMBERc              3  óT   K  — | ]#}t           j                             |¦  «        V — Œ$d S r`   )r©   ÚenvironrS   )rM   Úvars     r   rh   z running_on_ci.<locals>.<genexpr>:  s0   è è € Ð7Ð7 s�rŒz�~Š~˜cÑ"Ô"Ð7Ð7Ð7Ð7Ð7Ð7r   )rq   )Úenv_varss    r   Úrunning_on_cirË   5  s+   € ð �nÐ%€HÝÐ7Ð7¨hÐ7Ñ7Ô7Ñ7Ô7Ð7r   )r   r   r   r   )r   r    r   r!   )r+   r,   r   r   r`   )r4   r5   r   r6   )r   rE   )r@   rY   rW   r6   rX   rZ   r   r[   )r@   r,   r   r[   )r‡   rˆ   r   r6   )r    r   rW   r6   re   r   r   r   )r+   r    r   r!   )r   r£   )r°   r
   r   r
   rÂ   )3rÃ   Ú
__future__r   Úcollections.abcr   Úenumr–   r$   r   r   r©   Úpathlibr   r/   Útypingr   r	   r
   Úpyr0   Úannotationlibr   r   Úlocalr   r   ÚEnumr   r   r   Ú__annotations__r%   r*   r1   rD   rU   rx   r{   r€   r‘   ÚupdateÚordr“   r:   r›   rž   r¢   r­   r¯   rµ   rË   r   r   r   ú<module>rØ      sd  ðà EÐ EÐ Eà "Ð "Ð "Ð "Ð "Ð "à $Ð $Ð $Ð $Ð $Ð $Ø €€€Ø Ð Ð Ð Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø 	€	€	€	Ø Ð Ð Ð Ð Ð Ø 
€
€
€
Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à 	€	€	€	ð Ô�wÒÐØ$Ð$Ð$Ð$Ð$Ð$ð ŒgŒn€ðð ð ð ðð ð ð ð �”ñ ô ð àÔ €Ð  Ð  Ð  Ñ  ð	Vð 	Vð 	Vð 	VðIð Ið Ið Ið"ð "ð "ð "ð ð  ð  ð  ð  ðð ð ð ð, Øð	Að Að Að Að Að AðH	ð 	ð 	ð 	ð(ð (Ø#˜e C™jœjð(ñ (ô (Ð $ð %× +Ò +Ø€Sˆ�Y„Y��s�s˜4‘y”y %¨¨¨T©¬°EÐ:ñô ð ð
?ð ?ð ?ð ?ð.ð ð ðð ð ðð ð ð ð"ð ð ð ð-ð -ð -ð -ð* Ô�wÒÐØ#Ð#Ð#Ð#Ð#Ð#Ð#ðKð Kð Kð Kðð ð ð ð ñ ô ð ð(8ð 8ð 8ð 8ð 8ð 8r   