mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 10:16:52 +00:00
Add check_case_conflict hook #21
This commit is contained in:
parent
b08f834d65
commit
c682b50749
11 changed files with 173 additions and 20 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import io
|
||||
import os.path
|
||||
|
||||
|
||||
|
|
@ -6,3 +7,9 @@ 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') as file_obj:
|
||||
file_obj.write(contents)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue