We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98d45b3 commit f55abebCopy full SHA for f55abeb
src/unasync/__init__.py
@@ -71,8 +71,8 @@ def _unasync_file(self, filepath):
71
result = _untokenize(tokens)
72
outfilepath = filepath.replace(self.fromdir, self.todir)
73
os.makedirs(os.path.dirname(outfilepath), exist_ok=True)
74
- with open(outfilepath, "w", encoding=encoding) as f:
75
- print(result, file=f, end="")
+ with open(outfilepath, "wb") as f:
+ f.write(result.encode(encoding))
76
77
def _unasync_tokens(self, tokens):
78
# TODO __await__, ...?
0 commit comments