
    f
                     V   d Z ddlZddlZddlZej                  j
                  Zej                  j                  eej                  j                  z  Z ej                  dj                   ej                  e                  Z[d Zd Zd Z G d de      Zd	 Zd
 Z G d d      Zy)zC A universal module with functions / classes without dependencies.     Nz (?:\.[^{0}]+|[{0}]__init__\.py)$c                       fd}|S )Nc                  &    t         | i |      S N)listargskwargsfuncs     O/var/www/cvtools/html/venv/lib/python3.12/site-packages/jedi/inference/utils.pywrapperzto_list.<locals>.wrapper   s    D$)&)**     r
   r   s   ` r   to_listr      s    +Nr   c                       fd}|S )Nc                  &    t         | i |      S r   )tupler   s     r   r   zto_tuple.<locals>.wrapper   s    T4*6*++r   r   r   s   ` r   to_tupler      s    ,Nr   c                 &    t        d | D              S )z5Turns a two dimensional array into a one dimensional.c              3   .   K   | ]  }|D ]  }|   y wr   r   ).0typestyps      r   	<genexpr>zunite.<locals>.<genexpr>   s     :uE:Ss:s:s   )set)iterables    r   uniter      s    ::::r   c                       e Zd ZdZy)UncaughtAttributeErrora  
    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().
    N)__name__
__module____qualname____doc__r   r   r   r   r      s    r   r   c                 *    t        t        |             S r   )propertyreraise_uncaught)r
   s    r   safe_propertyr'   +   s    $T*++r   c                 B     t        j                          fd       }|S )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                  P    	  | i |S # t         $ r}t        |      |d }~ww xY wr   )AttributeErrorr   )r   kwdser
   s      r   r   z!reraise_uncaught.<locals>.wrapper@   s5    	3&&& 	3(+2	3s    	% %)	functoolswrapsr   s   ` r   r&   r&   /   s'    " __T3 3
 Nr   c                   $    e Zd Zd Zd Zd Zd Zy)PushBackIteratorc                 .    g | _         || _        d | _        y r   )pushesiteratorcurrent)selfr3   s     r   __init__zPushBackIterator.__init__J   s     r   c                 :    | j                   j                  |       y r   )r2   append)r5   values     r   	push_backzPushBackIterator.push_backO   s    5!r   c                     | S r   r   r5   s    r   __iter__zPushBackIterator.__iter__R   s    r   c                     | j                   r+| j                   j                         | _        | j                  S t        | j                        | _        | j                  S r   )r2   popr4   nextr3   r<   s    r   __next__zPushBackIterator.__next__U   sC    ;;;;??,DL ||  .DL||r   N)r    r!   r"   r6   r:   r=   rA   r   r   r   r0   r0   I   s    
"r   r0   )r#   r-   reospathsep_sepaltsepcompileformatescape_path_rer   r   r   	Exceptionr   r'   r&   r0   r   r   r   <module>rM      s    I  	 	 
ww{{77>>BGGNND2::9@@4QR;
	Y 	,4 r   