summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixes/fix_set_literal.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/fixes/fix_set_literal.py')
-rw-r--r--Lib/lib2to3/fixes/fix_set_literal.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/lib2to3/fixes/fix_set_literal.py b/Lib/lib2to3/fixes/fix_set_literal.py
index 35743d2..b3c267c 100644
--- a/Lib/lib2to3/fixes/fix_set_literal.py
+++ b/Lib/lib2to3/fixes/fix_set_literal.py
@@ -38,15 +38,15 @@ class FixSetLiteral(fixer_base.BaseFix):
literal.extend(n.clone() for n in items.children)
literal.append(pytree.Leaf(token.RBRACE, "}"))
# Set the prefix of the right brace to that of the ')' or ']'
- literal[-1].set_prefix(items.next_sibling.get_prefix())
+ literal[-1].prefix = items.next_sibling.prefix
maker = pytree.Node(syms.dictsetmaker, literal)
- maker.set_prefix(node.get_prefix())
+ maker.prefix = node.prefix
# If the original was a one tuple, we need to remove the extra comma.
if len(maker.children) == 4:
n = maker.children[2]
n.remove()
- maker.children[-1].set_prefix(n.get_prefix())
+ maker.children[-1].prefix = n.prefix
# Finally, replace the set call with our shiny new literal.
return maker