Server IP : 192.158.238.246 / Your IP : 18.118.95.74 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 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 : |
� ��bg� � �\ � 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 �c/builddir/build/BUILD/cloudlinux-venv-1.0.7/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'