Home | History | Annotate | Download | only in fixes
      1 """Fixer that changes raw_input(...) into input(...)."""
      2 # Author: Andre Roberge
      3 
      4 # Local imports
      5 from .. import fixer_base
      6 from ..fixer_util import Name
      7 
      8 class FixRawInput(fixer_base.BaseFix):
      9 
     10     BM_compatible = True
     11     PATTERN = """
     12               power< name='raw_input' trailer< '(' [any] ')' > any* >
     13               """
     14 
     15     def transform(self, node, results):
     16         name = results["name"]
     17         name.replace(Name("input", prefix=name.prefix))
     18