| Server IP : 198.54.126.161 / Your IP : 216.73.217.148 Web Server : LiteSpeed System : Linux premium12.web-hosting.com 4.18.0-553.94.1.lve.el8.x86_64 #1 SMP Thu Jan 22 12:37:22 UTC 2026 x86_64 User : amerfigf ( 898) PHP Version : 8.2.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib64/python3.11/site-packages/astroid/__pycache__/ |
Upload File : |
�
�|oi� � �\ � d dl mZ d dlZd dlmZ d dlmZ erd dlmZ G d� d� � Z dS )� )�annotationsN)�
TYPE_CHECKING)�_invalidate_cache)�NodeNGc �F � e Zd ZdZd� Zdd�Zd� Zd� Zddd�Zddd�Z d
� Z
d S )�TransformVisitoraP A visitor for handling transforms.
The standard approach of using it is to call
:meth:`~visit` with an *astroid* module and the class
will take care of the rest, walking the tree and running the
transforms for each encountered node.
Based on its usage in AstroidManager.brain, it should not be reinstantiated.
c �B � t j t � � | _ d S �N)�collections�defaultdict�list�
transforms)�selfs �d/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/astroid/transforms.py�__init__zTransformVisitor.__init__ s � �%�1�$�7�7����� �noder �returnc � � |j }| j | }|D ]<\ }}|� ||� � r* ||� � }|�t � � |}|j |k r n�=|S )zdCall matching transforms for the given node if any and return the
transformed node.
)� __class__r r )r r �clsr �transform_func� predicate�rets r �
_transformzTransformVisitor._transform s} � � �n���_�S�)�
�)3�
�
�%�N�I�� �I�I�d�O�O� �$�n�T�*�*�� �?�%�'�'�'��D��=�C�'�'��E���r c �� � t |d� � rF|j D ]>}t ||� � }| � |� � }||k rt |||� � �?| � |� � S )N�_astroid_fields)�hasattrr �getattr�_visit_generic�setattrr )r r �name�value�visiteds r �_visitzTransformVisitor._visit2 sy � ��4�*�+�+� 1��,�
1�
1����d�+�+���-�-�e�4�4���e�#�#��D�$��0�0�0�����t�$�$�$r c � � � t |t � � r� fd�|D � � S t |t � � rt � fd�|D � � � � S |rt |t � � r|S � � |� � S )Nc �: �� g | ]}�� |� � ��S � �r ��.0�childr s �r �
<listcomp>z3TransformVisitor._visit_generic.<locals>.<listcomp>= s'