mirror of https://github.com/python/cpython
unicode->str.
This commit is contained in:
parent
4fbc72b4ac
commit
a0272aa6e9
|
@ -25,11 +25,11 @@ class FixImport(basefix.BaseFix):
|
|||
def transform(self, node, results):
|
||||
imp = results['imp']
|
||||
|
||||
if unicode(imp).startswith('.'):
|
||||
if str(imp).startswith('.'):
|
||||
# Already a new-style import
|
||||
return
|
||||
|
||||
if not probably_a_local_import(unicode(imp), self.filename):
|
||||
if not probably_a_local_import(str(imp), self.filename):
|
||||
# I guess this is a global import -- skip it!
|
||||
return
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class FixItertoolsImports(basefix.BaseFix):
|
|||
else:
|
||||
remove_comma ^= True
|
||||
|
||||
if unicode(children[-1]) == ',':
|
||||
if str(children[-1]) == ',':
|
||||
children[-1].remove()
|
||||
|
||||
# If there is nothing left, return a blank line
|
||||
|
|
Loading…
Reference in New Issue