HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: //usr/local/lib/python3.9/site-packages/libfuturize/fixes/__pycache__/fix_next_call.cpython-39.pyc
a

��?hV�@sndZddlmZddlmZddlmZddlm	Z	m
Z
mZdZGdd�dej
�Zd	d
�Zdd�Zd
d�ZdS)a
Based on fix_next.py by Collin Winter.

Replaces it.next() -> next(it), per PEP 3114.

Unlike fix_next.py, this fixer doesn't replace the name of a next method with __next__,
which would break Python 2 compatibility without further help from fixers in
stage 2.
�)�token)�python_symbols)�
fixer_base)�Name�Call�find_bindingz;Calls to builtin next() possibly shadowed by global bindingcs0eZdZdZdZdZ�fdd�Zdd�Z�ZS)�FixNextCallTz�
    power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
    |
    power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
    |
    global=global_stmt< 'global' any* 'next' any* >
    �precs>tt|��||�td|�}|r4|�|t�d|_nd|_dS)N�nextTF)�superr�
start_treer�warning�bind_warning�
shadowed_next)�self�tree�filename�n��	__class__��I/usr/local/lib/python3.9/site-packages/libfuturize/fixes/fix_next_call.pyr s
zFixNextCall.start_treecCs�|sJ�|�d�}|�d�}|�d�}|rf|jr2q�dd�|D�}d|d_|�ttd|jd	�|��nb|rln\|r�t|�r�|d
}d�dd�|D����dkr�|�	|t
�dSnd
|vr�|�	|t
�d|_dS)N�base�attr�namecSsg|]}|���qSr)�clone��.0rrrr�
<listcomp>7�z)FixNextCall.transform.<locals>.<listcomp>�rr
)�prefix�headcSsg|]}t|��qSr)�strrrrrrEr�__builtin__�globalT)�getrr!�replacerr�is_assign_target�join�stripr
r)r�node�resultsrrrr"rrr�	transform*s*



zFixNextCall.transform)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERN�orderrr-�
__classcell__rrrrrs

rcCsFt|�}|durdS|jD]&}|jtjkr0dSt||�rdSqdS)NFT)�find_assign�children�typer�EQUAL�
is_subtree)r+Zassign�childrrrr(Rs

r(cCs4|jtjkr|S|jtjks&|jdur*dSt|j�S�N)r5�symsZ	expr_stmtZsimple_stmt�parentr3�r+rrrr3^s
r3cs$|�krdSt�fdd�|jD��S)NTc3s|]}t|��VqdSr9)r7)r�cr<rr�	<genexpr>hrzis_subtree.<locals>.<genexpr>)�anyr4)�rootr+rr<rr7esr7N)�__doc__Z
lib2to3.pgen2rZlib2to3.pygramrr:Zlib2to3rZlib2to3.fixer_utilrrrrZBaseFixrr(r3r7rrrr�<module>s>