We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13c4c4f commit 7579aceCopy full SHA for 7579ace
src/unasync/__init__.py
@@ -78,7 +78,9 @@ def _unasync_file(self, filepath):
78
tokens = _tokenize(f)
79
tokens = self._unasync_tokens(tokens)
80
result = _untokenize(tokens)
81
- result = self._unasync_remove(contents=result, filename=filepath)
+ # Limit to Python3.8+ until we know how to support older versions
82
+ if (sys.version_info[0] == 3 and sys.version_info[1] >= 8) or sys.version_info[0] > 3:
83
+ result = self._unasync_remove(contents=result, filename=filepath)
84
outfilepath = filepath.replace(self.fromdir, self.todir)
85
_makedirs_existok(os.path.dirname(outfilepath))
86
with open(outfilepath, "w", **write_kwargs) as f:
0 commit comments