diff --git a/Lib/lib2to3/fixes/fix_import.py b/Lib/lib2to3/fixes/fix_import.py index 4c751337dc4..935f316dd2d 100644 --- a/Lib/lib2to3/fixes/fix_import.py +++ b/Lib/lib2to3/fixes/fix_import.py @@ -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 diff --git a/Lib/lib2to3/fixes/fix_itertools_imports.py b/Lib/lib2to3/fixes/fix_itertools_imports.py index cbabfee386e..44dd82b74c2 100644 --- a/Lib/lib2to3/fixes/fix_itertools_imports.py +++ b/Lib/lib2to3/fixes/fix_itertools_imports.py @@ -42,4 +42,4 @@ class FixItertoolsImports(fixer_base.BaseFix): p = node.get_prefix() node = BlankLine() node.prefix = p - return node + return node diff --git a/Lib/lib2to3/fixes/fix_metaclass.py b/Lib/lib2to3/fixes/fix_metaclass.py index b508f5f3809..123268e9176 100644 --- a/Lib/lib2to3/fixes/fix_metaclass.py +++ b/Lib/lib2to3/fixes/fix_metaclass.py @@ -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) diff --git a/Lib/lib2to3/fixes/fix_tuple_params.py b/Lib/lib2to3/fixes/fix_tuple_params.py index fb29f5c95d0..21379ecb4d9 100644 --- a/Lib/lib2to3/fixes/fix_tuple_params.py +++ b/Lib/lib2to3/fixes/fix_tuple_params.py @@ -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 diff --git a/Lib/lib2to3/fixes/fix_xrange.py b/Lib/lib2to3/fixes/fix_xrange.py index ca8f21ad2e1..a63af34f0a4 100644 --- a/Lib/lib2to3/fixes/fix_xrange.py +++ b/Lib/lib2to3/fixes/fix_xrange.py @@ -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)