Python code coverage for Lib/lib2to3/fixes/fix_raw_input.py
# | count | content |
---|---|---|
1 | n/a | """Fixer that changes raw_input(...) into input(...).""" |
2 | n/a | # Author: Andre Roberge |
3 | n/a | |
4 | n/a | # Local imports |
5 | n/a | from .. import fixer_base |
6 | n/a | from ..fixer_util import Name |
7 | n/a | |
8 | n/a | class FixRawInput(fixer_base.BaseFix): |
9 | n/a | |
10 | n/a | BM_compatible = True |
11 | n/a | PATTERN = """ |
12 | n/a | power< name='raw_input' trailer< '(' [any] ')' > any* > |
13 | n/a | """ |
14 | n/a | |
15 | n/a | def transform(self, node, results): |
16 | n/a | name = results["name"] |
17 | n/a | name.replace(Name("input", prefix=name.prefix)) |