<s> u"""<STR_LIT>""" <EOL> from lib2to3 import fixer_base <EOL> from lib2to3 . fixer_util import Comma , Node , Leaf , token , syms <EOL> class FixRaise ( fixer_base . BaseFix ) : <EOL> PATTERN = u"""<STR_LIT>""" <EOL> def transform ( self , node , results ) : <EOL> FIXME <EOL> name , val , trc = ( results . get ( u"<STR_LIT:name>" ) , results . get ( u"<STR_LIT>" ) , results . get ( u"<STR_LIT>" ) ) <EOL> chain = results . get ( u"<STR_LIT>" ) <EOL> if chain is not None : <EOL> self . warning ( node , u"<STR_LIT>" ) <EOL> chain . prev_sibling . remove ( ) <EOL> chain . remove ( ) <EOL> if trc is not None : <EOL> val = val [ <NUM_LIT:0> ] if val else Leaf ( token . NAME , u"<STR_LIT:None>" ) <EOL> val . prefix = trc . prefix = u"<STR_LIT:U+0020>" <EOL> kids = [ Leaf ( token . NAME , u"<STR_LIT>" ) , name . clone ( ) , Comma ( ) , <EOL> val . clone ( ) , Comma ( ) , trc . clone ( ) ] <EOL> raise_stmt = Node ( syms . raise_stmt , kids ) <EOL> node . replace ( raise_stmt ) </s>
