1 | n/a | # Copyright 2006 Google, Inc. All Rights Reserved. |
---|
2 | n/a | # Licensed to PSF under a Contributor Agreement. |
---|
3 | n/a | |
---|
4 | n/a | """Fixer that turns 'long' into 'int' everywhere. |
---|
5 | n/a | """ |
---|
6 | n/a | |
---|
7 | n/a | # Local imports |
---|
8 | n/a | from lib2to3 import fixer_base |
---|
9 | n/a | from lib2to3.fixer_util import is_probably_builtin |
---|
10 | n/a | |
---|
11 | n/a | |
---|
12 | n/a | class FixLong(fixer_base.BaseFix): |
---|
13 | n/a | BM_compatible = True |
---|
14 | n/a | PATTERN = "'long'" |
---|
15 | n/a | |
---|
16 | n/a | def transform(self, node, results): |
---|
17 | n/a | if is_probably_builtin(node): |
---|
18 | n/a | node.value = "int" |
---|
19 | n/a | node.changed() |
---|