Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/fix_isinstance.cpython-311.pyc
�

�,dH��H�dZddlmZddlmZGd�dej��ZdS)a,Fixer that cleans up a tuple argument to isinstance after the tokens
in it were fixed.  This is mainly used to remove double occurrences of
tokens as a leftover of the long -> int / unicode -> str conversion.

eg.  isinstance(x, (int, long)) -> isinstance(x, (int, int))
       -> isinstance(x, int)
�)�
fixer_base)�tokenc� �eZdZdZdZdZd�ZdS)�
FixIsinstanceTz�
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    �c���t��}|d}|j}g}t|��}|D]�\}}	|	jtjkrN|	j|vrE|t|��dz
kr.||dzjtjkrt|���g�h|�
|	��|	jtjkr|�|	j����|r|djtjkr|d=t|��dkr6|j}
|
j
|d_
|
�|d��dS||dd�<|���dS)N�args�����)�set�children�	enumerate�typer�NAME�value�len�COMMA�next�append�add�parent�prefix�replace�changed)�self�node�results�names_inserted�testlistr	�new_args�iterator�idx�arg�atoms           �C/opt/alt/python311/lib64/python3.11/lib2to3/fixes/fix_isinstance.py�	transformzFixIsinstance.transformsO�������6�?��� �����T�?�?�� �	2�	2�H�C���x�5�:�%�%�#�)�~�*E�*E���T���Q��&�&�4��a��=�+=���+L�+L���N�N�N�������$�$�$��8�u�z�)�)�"�&�&�s�y�1�1�1���	����)�U�[�8�8�����x�=�=�A����?�D�!%��H�Q�K���L�L��!��%�%�%�%�%��D����G��L�L�N�N�N�N�N�N)�__name__�
__module__�__qualname__�
BM_compatible�PATTERN�	run_orderr'�r(r&rrs6�������M��G��I�����r(rN)�__doc__�r�
fixer_utilr�BaseFixrr/r(r&�<module>r4sl����������������$�$�$�$�$�J�&�$�$�$�$�$r(

ZeroDay Forums Mini