
    Mh
                     (   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	                     ej
        e                              Z[d Zd Zd Z G d de          Zd	 Zd
 Z G d d          ZdS )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     T/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/jedi/inference/utils.pywrapperzto_list.<locals>.wrapper   s     DD$)&))***     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     TT4*6**+++r   r   r   s   ` r   to_tupler      s!    , , , , ,Nr   c                 4    t          d | D                       S )z5Turns a two dimensional array into a one dimensional.c              3   $   K   | ]}|D ]}|V  d S r   r   ).0typestyps      r   	<genexpr>zunite.<locals>.<genexpr>   s/      ::uE::Ss:::::::r   )set)iterables    r   uniter      s    ::::::::r   c                       e Zd ZdZdS )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                 F     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                  Z    	  | i |S # t           $ r}t          |          |d }~ww xY wr   )AttributeErrorr   )r   kwdser
   s      r   r   z!reraise_uncaught.<locals>.wrapper@   sL    	34&&&& 	3 	3 	3(++2	3s    
*%*)	functoolswrapsr   s   ` r   r&   r&   /   s:    " _T3 3 3 3 3
 Nr   c                   &    e Zd Zd Zd Zd Zd ZdS )PushBackIteratorc                 0    g | _         || _        d | _        d S r   )pushesiteratorcurrent)selfr3   s     r   __init__zPushBackIterator.__init__J   s     r   c                 :    | j                             |           d S 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                                         | _        nt          | j                  | _        | j        S r   )r2   popr4   nextr3   r<   s    r   __next__zPushBackIterator.__next__U   s:    ; 	/;??,,DLL..DL|r   N)r    r!   r"   r6   r:   r=   rA   r   r   r   r0   r0   I   sP          
" " "      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 I     				 				 
w{7>BGND2:9@@4QQRR    ; ; ;
	 	 	 	 	Y 	 	 	, , ,  4         r   