U AT^&@s:dZddlmZddlmZmZmZGdddejZdS)zA Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) ) fixer_base) BlankLinesymstokenc@s"eZdZdZdeZddZdS)FixItertoolsImportsTzT import_from< 'from' 'itertools' 'import' imports=any > c Csp|d}|jtjks|js"|g}n|j}|dddD]}|jtjkrR|j}|}n,|jtjkrddS|jtjkstt|jd}|j}|dkrd|_| q6|dkr6| |ddkrdnd |_q6|jddp|g}d } |D]*}| r|jtj kr| q| d N} q|r4|d jtj kr4| q |jsJt |d drV|jdkrl|j} t}| |_|SdS) Nimportsr)imapizipifilter) ifilterfalse izip_longestf filterfalse zip_longestTvalue)typerZimport_as_namechildrenrNAMErSTARAssertionErrorremovechangedCOMMApopgetattrparentprefixr) selfZnoderesultsrrZchildmemberZ name_node member_nameZ remove_commapr%;/usr/lib64/python3.8/lib2to3/fixes/fix_itertools_imports.py transformsH      zFixItertoolsImports.transformN)__name__ __module__ __qualname__Z BM_compatiblelocalsZPATTERNr'r%r%r%r&rs rN) __doc__Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrr%r%r%r&s