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 a54a376..37ff624 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.prefix
- if prefix.isspace() and "\n" not in prefix:
- child.prefix = ""
+ if prefix.isspace() and u"\n" not in prefix:
+ child.prefix = u""
comma = True
else:
if comma:
prefix = child.prefix
if not prefix:
- child.prefix = " "
+ child.prefix = u" "
comma = False
return new