U if&@s6ddlmZddlmZmZmZGdddejZdS)) fixer_base) BlankLinesymstokenc@s"eZdZdZdeZddZdS)FixItertoolsImportsTzT import_from< 'from' 'itertools' 'import' imports=any > c CsZ|d}|jtjks|js"|g}n|j}|dddD]|}|jtjkrR|j}|}n|jtjkrddS|jd}|j}|dkrd|_|q6|dkr6| |ddkrdnd |_q6|jddp|g}d } |D]&}| r|jtj kr|q| d N} q|r|d jtj kr| q|js4t |d dr@|j dkrV|j} t}| |_|SdS) Nimportsr)ZimapZizipZifilter)Z ifilterfalseZ izip_longestf filterfalse zip_longestTvalue)typerZimport_as_namechildrenrNAMErSTARremoveZchangedCOMMApopgetattrparentprefixr) selfZnodeZresultsrrZchildmemberZ name_node member_nameZ remove_commaprH/opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_itertools_imports.py transformsF      zFixItertoolsImports.transformN)__name__ __module__ __qualname__Z BM_compatiblelocalsZPATTERNrrrrrrs rN)Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrrrrrs