summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixes/fix_ws_comma.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/fixes/fix_ws_comma.py')
-rw-r--r--Lib/lib2to3/fixes/fix_ws_comma.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/lib2to3/fixes/fix_ws_comma.py b/Lib/lib2to3/fixes/fix_ws_comma.py
index e493498..b5bfd8c 100644
--- a/Lib/lib2to3/fixes/fix_ws_comma.py
+++ b/Lib/lib2to3/fixes/fix_ws_comma.py
@@ -17,8 +17,8 @@ class FixWsComma(fixer_base.BaseFix):
any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
"""
- COMMA = pytree.Leaf(token.COMMA, ",")
- COLON = pytree.Leaf(token.COLON, ":")
+ COMMA = pytree.Leaf(token.COMMA, u",")
+ COLON = pytree.Leaf(token.COLON, u":")
SEPS = (COMMA, COLON)
def transform(self, node, results):
@@ -27,13 +27,13 @@ class FixWsComma(fixer_base.BaseFix):
for child in new.children:
if child in self.SEPS:
prefix = child.get_prefix()
- if prefix.isspace() and "\n" not in prefix:
- child.set_prefix("")
+ if prefix.isspace() and u"\n" not in prefix:
+ child.set_prefix(u"")
comma = True
else:
if comma:
prefix = child.get_prefix()
if not prefix:
- child.set_prefix(" ")
+ child.set_prefix(u" ")
comma = False
return new