U AT^&c@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) Nimportsir)ZimapZizipZifilter)Z ifilterfalseZ izip_longestiZfZ filterfalseZ zip_longestTivalue)ZtyperZimport_as_namechildrenrZNAMErZSTARZAssertionErrorZremoveZchangedZCOMMAZpopZgetattrZparentZprefixr) ZselfZnodeZresultsrrZchildZmemberZ name_nodeZ member_nameZ remove_commaZpr ;/usr/lib64/python3.8/lib2to3/fixes/fix_itertools_imports.py transformsH      zFixItertoolsImports.transformN)Z__name__Z __module__Z __qualname__Z BM_compatibleZlocalsZPATTERNr r r r r rs rN) Z__doc__Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrr r r r Zs