diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_basestring.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_basestring.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/lib2to3/fixes/fix_basestring.py b/Lib/lib2to3/fixes/fix_basestring.py new file mode 100644 index 0000000..6d753d8 --- /dev/null +++ b/Lib/lib2to3/fixes/fix_basestring.py @@ -0,0 +1,13 @@ +"""Fixer for basestring -> str.""" +# Author: Christian Heimes + +# Local imports +from . import basefix +from .util import Name + +class FixBasestring(basefix.BaseFix): + + PATTERN = "'basestring'" + + def transform(self, node, results): + return Name("str", prefix=node.get_prefix()) |