Commits

Benjamin Peterson committed f1ae40b

never return the original node given to transform()

  • Participants
  • Parent commits dfd89cb

Comments (0)

Files changed (3)

File lib2to3/fixes/fix_import.py

             if self.probably_a_local_import(imp.value):
                 imp.value = u"." + imp.value
                 imp.changed()
-                return node
         else:
             have_local = False
             have_absolute = False

File lib2to3/fixes/fix_itertools_imports.py

             p = node.prefix
             node = BlankLine()
             node.prefix = p
-        return node
+            return node

File lib2to3/fixes/fix_xrange.py

             for n in results["rest"]:
                 list_call.append_child(n)
             return list_call
-        return node
 
     P1 = "power< func=NAME trailer< '(' node=any ')' > any* >"
     p1 = patcomp.compile_pattern(P1)