Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
Specify UTF8 as encoding explicitly when writing the temp file
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Langa committed Aug 31, 2017
1 parent 9a4cc09 commit a7ec00d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flake8_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def run(self) -> Iterator[_Flake8Error]:
# directory.
with TemporaryDirectory(prefix='flake8mypy_') as d:
with NamedTemporaryFile(
'w', prefix='tmpmypy_', suffix='.py', dir=d
'w', encoding='utf8', prefix='tmpmypy_', suffix='.py', dir=d
) as f:
self.filename = f.name
for line in self.lines:
Expand Down

0 comments on commit a7ec00d

Please sign in to comment.