0x1949 Team - FAZEMRX - MANAGER
Edit File: fix_next.cpython-310.pyc
o ��bcf � @ sn d Z ddlmZ ddlmZ ddlmZ ddlm Z m Z mZ dZG dd� dej �Zd d � Zdd� Zd d� ZdS )z.Fixer for it.next() -> next(it), per PEP 3114.� )�token)�python_symbols)� fixer_base)�Name�Call�find_bindingz;Calls to builtin next() possibly shadowed by global bindingc s0 e Zd ZdZdZdZ� fdd�Zdd� Z� ZS )�FixNextTa� power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > > | power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > > | classdef< 'class' any+ ':' suite< any* funcdef< 'def' name='next' parameters< '(' NAME ')' > any+ > any* > > | global=global_stmt< 'global' any* 'next' any* > �prec s@ t t| ��||� td|�}|r| �|t� d| _d S d| _d S )N�nextTF)�superr � start_treer �warning�bind_warning� shadowed_next)�self�tree�filename�n�� __class__� �-/usr/lib/python3.10/lib2to3/fixes/fix_next.pyr $ s zFixNext.start_treec C s |sJ �|� d�}|� d�}|� d�}|r?| jr$|�td|jd�� d S dd� |D �}d|d _|�ttd |jd�|�� d S |rOtd|jd�}|�|� d S |rxt|�ro|d }d�dd� |D ���� d krm| � |t � d S |�td�� d S d|v r�| � |t � d| _d S d S )N�base�attr�name�__next__)�prefixc S s g | ]}|� � �qS r )�clone��.0r r r r � <listcomp>9 � z%FixNext.transform.<locals>.<listcomp>� � r �headc S s g | ]}t |��qS r )�strr r r r r E r! �__builtin__�globalT)�getr �replacer r r �is_assign_target�join�stripr r )r �node�resultsr r r r r$ r r r � transform. s0 �zFixNext.transform) �__name__� __module__�__qualname__� BM_compatible�PATTERN�orderr r/ � __classcell__r r r r r s r c C sF t | �}|d u r dS |jD ]}|jtjkr dS t|| �r dS q dS )NFT)�find_assign�children�typer �EQUAL� is_subtree)r- �assign�childr r r r* Q s �r* c C s4 | j tjkr| S | j tjks| jd u rd S t| j�S �N)r9 �syms� expr_stmt�simple_stmt�parentr7 �r- r r r r7 ] s r7 c s$ | � krdS t � fdd�| jD ��S )NTc 3 s � | ]}t |� �V qd S r>