AlkantarClanX12

Your IP : 3.147.28.111


Current Path : /opt/alt/python37/lib64/python3.7/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/lib2to3/fixes/__pycache__/fix_itertools_imports.cpython-37.pyc

B

� f&�@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 >
              cCsz|d}|jtjks|js"|g}n|j}x�|ddd�D]�}|jtjkrT|j}|}n*|jtjkrddS|jtjkstt�|jd}|j}|dkr�d|_|�	�q8|dkr8|�
�|ddkr�dnd	|_q8W|jdd�p�|g}d
}	x2|D]*}|	�r|jtjk�r|�	�q�|	d
N}	q�Wx*|�r<|djtjk�r<|���	��qW|j�sTt
|dd��r`|jdk�rv|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�H/opt/alt/python37/lib64/python3.7/lib2to3/fixes/fix_itertools_imports.py�	transformsD




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