ยปCore Development>Code coverage>Lib/lib2to3/fixes/fix_raw_input.py

Python code coverage for Lib/lib2to3/fixes/fix_raw_input.py

#countcontent
1n/a"""Fixer that changes raw_input(...) into input(...)."""
2n/a# Author: Andre Roberge
3n/a
4n/a# Local imports
5n/afrom .. import fixer_base
6n/afrom ..fixer_util import Name
7n/a
8n/aclass FixRawInput(fixer_base.BaseFix):
9n/a
10n/a BM_compatible = True
11n/a PATTERN = """
12n/a power< name='raw_input' trailer< '(' [any] ')' > any* >
13n/a """
14n/a
15n/a def transform(self, node, results):
16n/a name = results["name"]
17n/a name.replace(Name("input", prefix=name.prefix))