summaryrefslogtreecommitdiff
path: root/lib/python2.7/lib2to3/fixes/fix_basestring.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/lib2to3/fixes/fix_basestring.py')
-rw-r--r--lib/python2.7/lib2to3/fixes/fix_basestring.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/python2.7/lib2to3/fixes/fix_basestring.py b/lib/python2.7/lib2to3/fixes/fix_basestring.py
new file mode 100644
index 0000000..a3c9a43
--- /dev/null
+++ b/lib/python2.7/lib2to3/fixes/fix_basestring.py
@@ -0,0 +1,14 @@
+"""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(u"str", prefix=node.prefix)