Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: f125bf5f94ece89b42196ec08339a750e0eb3de6 authored by Georg Brandl on 04 March 2012, 15:26:19 UTC
Update copyright years and version name.
Tip revision: f125bf5
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):
    BM_compatible = True

    PATTERN = "'basestring'"

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