summaryrefslogtreecommitdiff
path: root/python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_basestring.py
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-09-04 20:44:00 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-04 20:44:01 +0000
commitfb5a02906f644d044eb0286bf27d413ba0e05216 (patch)
treebca7d49005d81d10c70bc3f547df041c636b4300 /python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_basestring.py
parent9cde0e3c015174898df8b8f3672185941fad4786 (diff)
parentd245f58efbfc26b13b9b9d5e52e6a83a0d76216c (diff)
downloadidea-fb5a02906f644d044eb0286bf27d413ba0e05216.tar.gz
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
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)