Hacked By AnonymousFox
�
�܋f�: � �� � d Z ddlmZ ddlZddlZddlZddlZddlmZm Z ddl
mZ ddlm
Z
mZmZ ddlZddlmZmZ ddlmZ dd lmZ eeegej f egeej f Zd,d�Zd-d�Z G d� d� � Z G d� d� � Z G d� deej � � Z G d� de� � Z G d� de � � Z! G d� d e!� � Z" G d!� d"e!� � Z#ed#ej$ fd.d+�Z%dS )/z|Visitor doing some post-processing on the astroid tree.
Try to resolve definitions (namespace) dictionary, relationship...
� )�annotationsN)�ABC�abstractmethod)� Generator)�Any�Callable�Optional)�nodes�util)� constants)�utils�func�Callable[[str], nodes.Module]�modname�str�return�nodes.Module | Nonec �� � t d|� d�� � | |� � S # t j j $ r}t |� � Y d }~n&d }~wt $ r t j � � Y nw xY wd S )Nzparsing z...)�print�astroid�
exceptions�AstroidBuildingException� Exception� traceback� print_exc)r r �excs �k/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/pyreverse/inspector.py�_astroid_wrapperr s� � �
�
!�W�
!�
!�
!�"�"�"���t�G�}�}�����6� � � �
�c�
�
�
�
�
�
�
�
������ � � �������������4s �
�A+�A� A+�*A+�node�nodes.ClassDef�Generator[Any, None, None]c # �� K � t j � | � � � d� � d }n# t j j $ r Y dS w xY w|� d�� � | urdS t � � }d}t j |� � D ]<}t |t j � � rd}�||vr|�
|� � |V � �=|rt j � � � �dS )zEReturn an iterator on interfaces implemented by the given class node.�__implements__r NT��futureF)r �bases�Instance�getattrr �
NotFoundError�frame�setr
�unpack_infer�
isinstancer �UninferableBase�add�InferenceError)r �
implements�found�missing�ifaces r �
interfacesr5 * s � � � ���]�+�+�D�1�1�9�9�:J�K�K�A�N�
�
����+� � � �����������t��$�$�D�0�0����E�E�E��G��#�J�/�/� � ���e�T�1�2�2� ��G�������I�I�e�����K�K�K��� 2�� �/�/�1�1�1�2� 2s �8= �A�Ac �. � e Zd ZdZddd�Zddd�Zd
d �Zd
S )�IdGeneratorMixInz1Mixin adding the ability to generate integer uid.r �start_value�intr �Nonec � � || _ d S �N��id_count��selfr8 s r �__init__zIdGeneratorMixIn.__init__B s
� �#��
�
�
� c � � || _ dS )zInit the id counter.Nr= r? s r �init_counterzIdGeneratorMixIn.init_counterE s
� �#��
�
�
rB c �0 � | xj dz
c_ | j S )zGenerate a new identifier.� r= �r@ s r �generate_idzIdGeneratorMixIn.generate_idI s � ��
�
���
�
��}�rB N)r )r8 r9 r r: )r r9 )�__name__�
__module__�__qualname__�__doc__rA rD rH � rB r r7 r7 ? s` � � � � � �;�;�$� $� $� $� $�$� $� $� $� $�� � � � � rB r7 c �<