<s> from lib2to3 import fixer_base , pytree <EOL> from lib2to3 . pgen2 import token <EOL> from lib2to3 . fixer_util import Name , Call , LParen , RParen , ArgList , Dot <EOL> """<STR_LIT>""" <EOL> class FixDictcomp ( fixer_base . BaseFix ) : <EOL> PATTERN = """<STR_LIT>""" <EOL> def transform ( self , node , results ) : <EOL> syms = self . syms <EOL> results [ '<STR_LIT:key>' ] . remove ( ) <EOL> results [ '<STR_LIT>' ] . remove ( ) <EOL> results [ '<STR_LIT:value>' ] . remove ( ) <EOL> res = pytree . Node ( syms . power , <EOL> [ Name ( '<STR_LIT>' , prefix = node . prefix ) , <EOL> pytree . Node ( syms . trailer , <EOL> [ pytree . Leaf ( token . LPAR , '<STR_LIT:(>' ) , <EOL> pytree . Node ( syms . argument , <EOL> [ pytree . Node ( syms . atom , <EOL> [ pytree . Leaf ( token . LPAR , '<STR_LIT:(>' ) , <EOL> pytree . Node ( syms . testlist_gexp , <EOL> [ results [ '<STR_LIT:key>' ] , <EOL> pytree . Leaf ( token . COMMA , '<STR_LIT:U+002C>' ) , <EOL> results [ '<STR_LIT:value>' ] ] ) , <EOL> pytree . Leaf ( token . RPAR , '<STR_LIT:)>' ) ] ) , <EOL> results [ '<STR_LIT>' ] ] ) , <EOL> pytree . Leaf ( token . RPAR , '<STR_LIT:)>' ) ] ) ] ) <EOL> return res </s>
