diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_next.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_next.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/lib2to3/fixes/fix_next.py b/Lib/lib2to3/fixes/fix_next.py index adbc962..6b54376 100644 --- a/Lib/lib2to3/fixes/fix_next.py +++ b/Lib/lib2to3/fixes/fix_next.py @@ -47,12 +47,12 @@ class FixNext(basefix.BaseFix): mod = results.get("mod") if base: - if self.shadowed_next: - attr.replace(Name("__next__", prefix=attr.get_prefix())) - else: - base = [n.clone() for n in base] - base[0].set_prefix("") - node.replace(Call(Name("next", prefix=node.get_prefix()), base)) + if self.shadowed_next: + attr.replace(Name("__next__", prefix=attr.get_prefix())) + else: + base = [n.clone() for n in base] + base[0].set_prefix("") + node.replace(Call(Name("next", prefix=node.get_prefix()), base)) elif name: n = Name("__next__", prefix=name.get_prefix()) name.replace(n) |