HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/alt/python312/lib64/python3.12/lib2to3/fixes/__pycache__/fix_isinstance.cpython-312.opt-1.pyc
�

���Ŧb!���J�dZddlmZddlmZGd�dej
�Zy)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�Zy)�
FixIsinstanceTz�
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    �c���t�}|d}|j}g}t|�}|D]�\}}	|	jtj
k(rP|	j|vrB|t|�dz
ks�C||dzjtjk(s�gt|��s|j|	�|	jtj
k(s��|j|	j���|r#|djtjk(r|d=t|�dk(r5|j}
|
j|d_
|
j|d�y||dd|j�y)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/python312/lib64/python3.12/lib2to3/fixes/fix_isinstance.py�	transformzFixIsinstance.transforms������6�?��� � �����T�?�� �H�C���x�x�5�:�:�%�#�)�)�~�*E���T��Q��&�4��a��=�+=�+=����+L���N������$��8�8�u�z�z�)�"�&�&�s�y�y�1�!�����)�)�U�[�[�8�����x�=�A���?�?�D�!%���H�Q�K���L�L��!��%��D��G��L�L�N�N)�__name__�
__module__�__qualname__�
BM_compatible�PATTERN�	run_orderr'�r(r&rrs���M��G��I�r(rN)�__doc__�r�
fixer_utilr�BaseFixrr/r(r&�<module>r4s$�����$�J�&�&�$r(