Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 3d407dc564bd92b46ed00380213f545e515d6ddf authored by Barry Warsaw on 04 December 2008, 02:59:51 UTC
Prep for 2.6.1
Tip revision: 3d407dc
fix_basestring.py
"""Fixer for basestring -> str."""
# Author: Christian Heimes

# Local imports
from .. import fixer_base
from ..fixer_util import Name

class FixBasestring(fixer_base.BaseFix):

    PATTERN = "'basestring'"

    def transform(self, node, results):
        return Name("str", prefix=node.get_prefix())
back to top