mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 10:16:52 +00:00
Remove write_file (now unnecessary)
This commit is contained in:
parent
71fadeb238
commit
9b1b44e9c9
2 changed files with 9 additions and 19 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import io
|
||||
import os.path
|
||||
|
||||
|
||||
|
|
@ -10,9 +9,3 @@ TESTING_DIR = os.path.abspath(os.path.dirname(__file__))
|
|||
|
||||
def get_resource_path(path):
|
||||
return os.path.join(TESTING_DIR, 'resources', path)
|
||||
|
||||
|
||||
def write_file(filename, contents):
|
||||
"""Hax because coveragepy chokes on nested context managers."""
|
||||
with io.open(filename, 'w', encoding='UTF-8', newline='') as file_obj:
|
||||
file_obj.write(contents)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue