<s> """<STR_LIT>""" <EOL> import re <EOL> from . . pgen2 import token <EOL> from . . import fixer_base <EOL> _mapping = { "<STR_LIT>" : "<STR_LIT>" , "<STR_LIT>" : "<STR_LIT:str>" } <EOL> _literal_re = re . compile ( r"<STR_LIT>" ) <EOL> class FixUnicode ( fixer_base . BaseFix ) : <EOL> BM_compatible = True <EOL> PATTERN = "<STR_LIT>" <EOL> def transform ( self , node , results ) : <EOL> if node . type == token . NAME : <EOL> new = node . clone ( ) <EOL> new . value = _mapping [ node . value ] <EOL> return new <EOL> elif node . type == token . STRING : <EOL> if _literal_re . match ( node . value ) : <EOL> new = node . clone ( ) <EOL> new . value = new . value [ <NUM_LIT:1> : ] <EOL> return new </s>
