Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/jedi/inference/__pycache__/utils.cpython-39.pyc
Ðазад
a j�h� � @ s� d Z ddlZddlZddlZejjZejjdur<eejj7 Ze�d� e� e���Z[dd� Zdd� Z dd � ZG d d� de�Zdd � Zdd� ZG dd� d�ZdS )zC A universal module with functions / classes without dependencies. � Nz (?:\.[^{0}]+|[{0}]__init__\.py)$c s � fdd�}|S )Nc s t � | i |���S �N)�list��args�kwargs��func� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/jedi/inference/utils.py�wrapper s zto_list.<locals>.wrapperr �r r r r r �to_list s r c s � fdd�}|S )Nc s t � | i |���S r )�tupler r r r r s zto_tuple.<locals>.wrapperr r r r r �to_tuple s r c C s t dd� | D ��S )z5Turns a two dimensional array into a one dimensional.c s s | ]}|D ] }|V q qd S r r )�.0�types�typr r r � <genexpr> � zunite.<locals>.<genexpr>)�set)�iterabler r r �unite s r c @ s e Zd ZdZdS )�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 c C s t t| ��S r )�property�reraise_uncaughtr r r r � safe_property+ s r c s t �� �� fdd��}|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 sD z� | i |��W S t y> } zt|�|�W Y d }~n d }~0 0 d S r )�AttributeErrorr )r �kwds�er r r r @ s z!reraise_uncaught.<locals>.wrapper)� functools�wrapsr r r r r / s r c @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S ) �PushBackIteratorc C s g | _ || _d | _d S r )�pushes�iterator�current)�selfr'