ó ™ö7ec@sWdZddlmZddlmZidd6dd6Zdejfd „ƒYZd S( s¢Fixer for unicode. * Changes unicode to str and unichr to chr. * If "...\u..." is not unicode literal change it into "...\\u...". * Change u"..." into "...". i(ttoken(t fixer_baseuchruunichrustruunicodet FixUnicodecBs&eZeZdZd„Zd„ZRS(sSTRING | 'unicode' | 'unichr'cCs/tt|ƒj||ƒd|jk|_dS(Ntunicode_literals(tsuperRt start_treetfuture_featuresR(tselfttreetfilename((s1/usr/lib64/python2.7/lib2to3/fixes/fix_unicode.pyRscCs|jtjkr2|jƒ}t|j|_|S|jtjkr|j}|j r¹|ddkr¹d|kr¹djg|j dƒD]$}|j ddƒj ddƒ^q‰ƒ}n|dd krÖ|d }n||jkré|S|jƒ}||_|SdS( Niu'"u\u\\u\uu\\uu\Uu\\UuuUi( ttypeRtNAMEtclonet_mappingtvaluetSTRINGRtjointsplittreplace(Rtnodetresultstnewtvaltv((s1/usr/lib64/python2.7/lib2to3/fixes/fix_unicode.pyt transforms"  &=   (t__name__t __module__tTruet BM_compatibletPATTERNRR(((s1/usr/lib64/python2.7/lib2to3/fixes/fix_unicode.pyRs N(t__doc__tpgen2RtRR tBaseFixR(((s1/usr/lib64/python2.7/lib2to3/fixes/fix_unicode.pyt s