]> granicus.if.org Git - python/commitdiff
Merged revisions 77900 via svnmerge from
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 1 Feb 2010 01:20:16 +0000 (01:20 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 1 Feb 2010 01:20:16 +0000 (01:20 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r77900 | martin.v.loewis | 2010-02-01 02:18:51 +0100 (Mo, 01 Feb 2010) | 24 lines

  Merged revisions 77898 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ................
    r77898 | martin.v.loewis | 2010-02-01 02:15:39 +0100 (Mo, 01 Feb 2010) | 17 lines

    Merged revisions 77855-77856,77870 via svnmerge from
    svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

    ........
      r77855 | benjamin.peterson | 2010-01-30 17:32:05 +0100 (Sa, 30 Jan 2010) | 1 line

      don't return node if it is not changed
    ........
      r77856 | benjamin.peterson | 2010-01-30 17:35:29 +0100 (Sa, 30 Jan 2010) | 1 line

      return None to indicate no change
    ........
      r77870 | benjamin.peterson | 2010-01-31 02:21:26 +0100 (So, 31 Jan 2010) | 1 line

      never return the original node given to transform()
    ........
  ................
................

Lib/lib2to3/fixes/fix_import.py
Lib/lib2to3/fixes/fix_itertools_imports.py
Lib/lib2to3/fixes/fix_metaclass.py
Lib/lib2to3/fixes/fix_tuple_params.py
Lib/lib2to3/fixes/fix_xrange.py

index 998fe613956f3bcd0045271ec686ff9752345a9d..625611d842b296a8dcccb2347f43bc4b4a05c3d2 100644 (file)
@@ -56,7 +56,6 @@ class FixImport(fixer_base.BaseFix):
             if self.probably_a_local_import(imp.value):
                 imp.value = "." + imp.value
                 imp.changed()
-                return node
         else:
             have_local = False
             have_absolute = False
index 4849dd28c13170034be6bac3b63e44eabaf726eb..1897e3647f893862b0dc0857faac78fcdebb1721 100644 (file)
@@ -49,4 +49,4 @@ class FixItertoolsImports(fixer_base.BaseFix):
             p = node.prefix
             node = BlankLine()
             node.prefix = p
-        return node
+            return node
index f7840d47e5ec1e0e13d5dda32c2c06d934a0e675..011669641856d114c09fad21fa111ae6cce5d0c0 100644 (file)
@@ -150,7 +150,7 @@ class FixMetaclass(fixer_base.BaseFix):
 
     def transform(self, node, results):
         if not has_metaclass(node):
-            return node
+            return
 
         fixup_parse_tree(node)
 
index fb47d01133b6c696f2536b2d4a292a2a7d882825..2085935337b74c256b9c83c4dff74615b60e2234 100644 (file)
@@ -81,7 +81,7 @@ class FixTupleParams(fixer_base.BaseFix):
                     handle_tuple(arg, add_prefix=(i > 0))
 
         if not new_lines:
-            return node
+            return
 
         # This isn't strictly necessary, but it plays nicely with other fixers.
         # TODO(cwinter) get rid of this when children becomes a smart list
index 677556bc20a5c1ce8ea1817ecc41a309f08482a3..7efeea486855330051c99be7b93b5b7302b47646 100644 (file)
@@ -40,7 +40,6 @@ class FixXrange(fixer_base.BaseFix):
             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)