Staging
v0.5.1
https://github.com/python/cpython
Revision e05a94c6ef0b921ece59da108a578d119d646ccf authored by Ned Deily on 26 September 2018, 23:53:43 UTC, committed by Ned Deily on 26 September 2018, 23:53:43 UTC
2 parent s 43500a5 + 311101f
Raw File
Tip revision: e05a94c6ef0b921ece59da108a578d119d646ccf authored by Ned Deily on 26 September 2018, 23:53:43 UTC
Merge tag 'v3.6.7rc1' into 3.6
Tip revision: e05a94c
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