Move most of the actual hook script into pre-commit hook-impl

This commit is contained in:
Anthony Sottile 2020-01-20 13:32:33 -08:00
parent 93152218a7
commit 95b8d71bd9
10 changed files with 471 additions and 201 deletions

View file

@ -1,6 +1,6 @@
import contextlib
import distutils.spawn
import os
import os.path
import shutil
import sys
import pytest
@ -12,7 +12,7 @@ from pre_commit.util import make_executable
def _echo_exe() -> str:
exe = distutils.spawn.find_executable('echo')
exe = shutil.which('echo')
assert exe is not None
return exe