HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/libpasteurize/fixes/__pycache__/fix_next.cpython-38.pyc
U

,�]��@sZdZddlmZddlmZddlmZddlm	Z	m
Z
mZmZdZ
Gdd�dej�Zd	S)
z?
Fixer for:
it.__next__() -> it.next().
next(it) -> it.next().
�)�token)�python_symbols)�
fixer_base)�Name�Call�find_binding�Attrz;Calls to builtin next() possibly shadowed by global bindingc@seZdZdZdd�ZdS)�FixNextas
    power< base=any+ trailer< '.' attr='__next__' > any* >
    |
    power< head='next' trailer< '(' arg=any ')' > any* >
    |
    classdef< 'class' base=any+ ':'
              suite< any*
                     funcdef< 'def'
                              attr='__next__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    cCs�|st�|�d�}|�d�}|�d�}|�d�}|rh|��}|�ttt|�|jd�td���|��n|r�|�td|jd��dS)N�base�attr�head�arg)�prefix�next)	�AssertionError�getZclone�replacerrZunicoder�remove)�selfZnodeZresultsr
rrZarg_r
�r�>/usr/lib/python3/dist-packages/libpasteurize/fixes/fix_next.py�	transforms



�
zFixNext.transformN)�__name__�
__module__�__qualname__ZPATTERNrrrrrr	s
r	N)�__doc__Z
lib2to3.pgen2rZlib2to3.pygramrZsymsZlib2to3rZlib2to3.fixer_utilrrrrZbind_warningZBaseFixr	rrrr�<module>s