summaryrefslogtreecommitdiff
path: root/python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_basestring.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_basestring.py')
-rw-r--r--python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_basestring.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_basestring.py b/python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_basestring.py
new file mode 100644
index 000000000000..a3c9a436492e
--- /dev/null
+++ b/python/helpers/pydev/third_party/pep8/lib2to3/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)