AlkantarClanX12

Your IP : 3.145.164.47


Current Path : /proc/self/root/lib64/python3.8/lib2to3/fixes/__pycache__/
Upload File :
Current File : //proc/self/root/lib64/python3.8/lib2to3/fixes/__pycache__/fix_itertools_imports.cpython-38.pyc

U

e5d&�@s:dZddlmZddlmZmZmZGdd�dej�ZdS)zA Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) �)�
fixer_base)�	BlankLine�syms�tokenc@s"eZdZdZde�Zdd�ZdS)�FixItertoolsImportsTzT
              import_from< 'from' 'itertools' 'import' imports=any >
              cCsp|d}|jtjks|js"|g}n|j}|ddd�D]�}|jtjkrR|j}|}n,|jtjkrddS|jtjkstt�|jd}|j}|dkr�d|_|�	�q6|dkr6|�
�|ddkr�dnd	|_q6|jdd�p�|g}d
}	|D]*}|	�r|jtjk�r|�	�q�|	d
N}	q�|�r4|djtjk�r4|���	��q|j�sJt
|dd��rV|jdk�rl|j}
t�}|
|_|SdS)
N�imports�r)ZimapZizipZifilter)ZifilterfalseZizip_longest��f�filterfalse�zip_longestT����value)�typerZimport_as_name�childrenr�NAMEr�STAR�AssertionError�removeZchanged�COMMA�pop�getattr�parent�prefixr)�selfZnodeZresultsrrZchild�memberZ	name_node�member_nameZremove_comma�p�r�;/usr/lib64/python3.8/lib2to3/fixes/fix_itertools_imports.py�	transformsH

�

�zFixItertoolsImports.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�localsZPATTERNr rrrrrs
�rN)	�__doc__Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrrrrr�<module>s