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