PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Lib/lib2to3/fixes/fix_basestring.py

http://unladen-swallow.googlecode.com/
Python | 13 lines | 6 code | 4 blank | 3 comment | 0 complexity | 0fe11afa759b94c75323aa2a3188089d MD5 | raw file
 1"""Fixer for basestring -> str."""
 2# Author: Christian Heimes
 3
 4# Local imports
 5from .. import fixer_base
 6from ..fixer_util import Name
 7
 8class FixBasestring(fixer_base.BaseFix):
 9
10    PATTERN = "'basestring'"
11
12    def transform(self, node, results):
13        return Name("str", prefix=node.get_prefix())