Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Commit 40dcf10

Browse files
authored
Fix conversions.py2to3 on unicode strings (#67)
The introduction of string kinds in #49 missed updating the 2to3 visitor for it. Update the `visit_Str` case to pass `s.kind` to `Str`. Fixes #66.
1 parent 5542039 commit 40dcf10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typed_ast/conversions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def visit_Str(self, s):
218218
if isinstance(s.s, bytes):
219219
return ast3.Bytes(s.s)
220220
else:
221-
return ast3.Str(s.s)
221+
return ast3.Str(s.s, s.kind)
222222

223223
def visit_Num(self, n):
224224
new = self.generic_visit(n)

0 commit comments

Comments
 (0)