mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-13 07:41:19 +08:00
Use newline='' to avoid automatic newline translation
This commit is contained in:
@@ -25,5 +25,5 @@ def get_resource_path(path):
|
||||
|
||||
def write_file(filename, contents):
|
||||
"""Hax because coveragepy chokes on nested context managers."""
|
||||
with io.open(filename, 'w') as file_obj:
|
||||
with io.open(filename, 'w', newline='') as file_obj:
|
||||
file_obj.write(contents)
|
||||
|
||||
Reference in New Issue
Block a user