ó
    Ð]jv
  ã                   óX  • S r SSKrSSKrSSKr\R                  R
                  r\R                  R                  b  \\R                  R                  -  r\R                  " SR                  \R                  " \5      5      5      rCS rS rS r " S S\5      rS	 rS
 r " S S5      rg)zBA universal module with functions / classes without dependencies. é    Nz (?:\.[^{0}]+|[{0}]__init__\.py)$c                 ó   ^ • U 4S jnU$ )Nc                  ó&   >• [        T" U 0 UD65      $ ©N)Úlist©ÚargsÚkwargsÚfuncs     €ÚQ/home/mande/repo/quber/.venv/lib/python3.13/site-packages/jedi/inference/utils.pyÚwrapperÚto_list.<locals>.wrapper   s   ø€ Ü‘D˜$Ð) &Ñ)Ó*Ð*ó    © ©r
   r   s   ` r   Úto_listr      s   ø€ õ+à€Nr   c                 ó   ^ • U 4S jnU$ )Nc                  ó&   >• [        T" U 0 UD65      $ r   )Útupler   s     €r   r   Úto_tuple.<locals>.wrapper   s   ø€ Ü‘T˜4Ð* 6Ñ*Ó+Ð+r   r   r   s   ` r   Úto_tupler      s   ø€ õ,à€Nr   c                 ó&   • [        S U  5       5      $ )z5Turns a two dimensional array into a one dimensional.c              3   ó6   #   • U  H  o  H  o"v •  M     M     g 7fr   r   )Ú.0ÚtypesÚtyps      r   Ú	<genexpr>Úunite.<locals>.<genexpr>   s   é € Ð:¢�u³E¨SŒs±E‰s¢ùs   ‚)Úset)Úiterables    r   Úuniter       s   € äÑ:¡Ó:Ó:Ð:r   c                   ó   • \ rS rSrSrSrg)ÚUncaughtAttributeErroré   a|  
Important, because `__getattr__` and `hasattr` catch AttributeErrors
implicitly. This is really evil (mainly because of `__getattr__`).
Therefore this class originally had to be derived from `BaseException`
instead of `Exception`.  But because I removed relevant `hasattr` from
the code base, we can now switch back to `Exception`.

:param base: return values of sys.exc_info().
r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   r   r   r"   r"      s   † ôr   r"   c                 ó*   • [        [        U 5      5      $ r   )ÚpropertyÚreraise_uncaught)r
   s    r   Úsafe_propertyr-   +   s   € ÜÔ$ TÓ*Ó+Ð+r   c                 óF   ^ • [         R                  " T 5      U 4S j5       nU$ )aö  
Re-throw uncaught `AttributeError`.

Usage:  Put ``@rethrow_uncaught`` in front of the function
which does **not** suppose to raise `AttributeError`.

AttributeError is easily get caught by `hasattr` and another
``except AttributeError`` clause.  This becomes problem when you use
a lot of "dynamic" attributes (e.g., using ``@property``) because you
can't distinguish if the property does not exist for real or some code
inside of the "dynamic" attribute through that error.  In a well
written code, such error should not exist but getting there is very
difficult.  This decorator is to help us getting there by changing
`AttributeError` to `UncaughtAttributeError` to avoid unexpected catch.
This helps us noticing bugs earlier and facilitates debugging.
c                  óR   >•  T" U 0 UD6$ ! [          a  n[        U5      UeS nAff = fr   )ÚAttributeErrorr"   )r   ÚkwdsÚer
   s      €r   r   Ú!reraise_uncaught.<locals>.wrapper@   s5   ø€ ð	3Ù˜Ð& Ñ&Ð&øÜó 	3Ü(¨Ó+°Ð2ûð	3ús   ƒ ‹
&•!¡&)Ú	functoolsÚwrapsr   s   ` r   r,   r,   /   s'   ø€ ô" ‡_‚_�TÓô3ó ð3ð
 €Nr   c                   ó,   • \ rS rSrS rS rS rS rSrg)ÚPushBackIteratoréI   c                 ó   • / U l         Xl        g r   )ÚpushesÚiterator)Úselfr;   s     r   Ú__init__ÚPushBackIterator.__init__J   s   € ØˆŒØ �r   c                 ó:   • U R                   R                  U5        g r   )r:   Úappend)r<   Úvalues     r   Ú	push_backÚPushBackIterator.push_backN   s   € Ø�‰×Ñ˜5Õ!r   c                 ó   • U $ r   r   ©r<   s    r   Ú__iter__ÚPushBackIterator.__iter__Q   s   € Øˆr   c                 óÆ   • U R                   (       a+  U R                   R                  5       U l        U R                  $ [        U R                  5      U l        U R                  $ r   )r:   ÚpopÚcurrentÚnextr;   rE   s    r   Ú__next__ÚPushBackIterator.__next__T   sC   € Ø�;�;ØŸ;™;Ÿ?™?Ó,ˆDŒLð �|‰|Ðô   §¡Ó.ˆDŒLØ�|‰|Ðr   )rJ   r;   r:   N)	r$   r%   r&   r'   r=   rB   rF   rL   r)   r   r   r   r7   r7   I   s   † ò!ò"òõr   r7   )r(   r4   ÚreÚosÚpathÚsepÚ_sepÚaltsepÚcompileÚformatÚescapeÚ_path_rer   r   r    Ú	Exceptionr"   r-   r,   r7   r   r   r   Ú<module>rY      s”   ðÙ IÛ Û 	Û 	ð 
‡w�w‡{�{€Ø‡7�7‡>�>ÑØˆB�G‰G�N‰NÑ€DØ�:Š:Ð9×@Ñ@ÀÇÂÈ4ÃÓQÓR€Øòòò;ô
	˜Yô 	ò,ò÷4ò r   