Commit e5304dc9 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Update pre-commit template hooks

parent f64c0c9e
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ else:
os.environ.pop('__PYVENV_LAUNCHER__', None)

# start templated
INSTALL_PYTHON = '/usr/bin/python3'
ARGS = ['hook-impl', '--config=.pre-commit-config.yaml', '--hook-type=commit-msg', '--skip-on-missing-config']
# end templated
ARGS.extend(('--hook-dir', os.path.realpath(os.path.dirname(__file__))))
@@ -25,9 +24,7 @@ ARGS.append('--')
ARGS.extend(sys.argv[1:])

DNE = '`pre-commit` not found.  Did you forget to activate your virtualenv?'
if os.access(INSTALL_PYTHON, os.X_OK):
    CMD = [INSTALL_PYTHON, '-mpre_commit']
elif which('pre-commit'):
if which('pre-commit'):
    CMD = ['pre-commit']
else:
    raise SystemExit(DNE)
+1 −4
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ else:
os.environ.pop('__PYVENV_LAUNCHER__', None)

# start templated
INSTALL_PYTHON = '/usr/bin/python3'
ARGS = ['hook-impl', '--config=.pre-commit-config.yaml', '--hook-type=pre-commit', '--skip-on-missing-config']
# end templated
ARGS.extend(('--hook-dir', os.path.realpath(os.path.dirname(__file__))))
@@ -25,9 +24,7 @@ ARGS.append('--')
ARGS.extend(sys.argv[1:])

DNE = '`pre-commit` not found.  Did you forget to activate your virtualenv?'
if os.access(INSTALL_PYTHON, os.X_OK):
    CMD = [INSTALL_PYTHON, '-mpre_commit']
elif which('pre-commit'):
if which('pre-commit'):
    CMD = ['pre-commit']
else:
    raise SystemExit(DNE)
+1 −4
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ else:
os.environ.pop('__PYVENV_LAUNCHER__', None)

# start templated
INSTALL_PYTHON = '/usr/bin/python3'
ARGS = ['hook-impl', '--config=.pre-commit-config.yaml', '--hook-type=pre-push', '--skip-on-missing-config']
# end templated
ARGS.extend(('--hook-dir', os.path.realpath(os.path.dirname(__file__))))
@@ -25,9 +24,7 @@ ARGS.append('--')
ARGS.extend(sys.argv[1:])

DNE = '`pre-commit` not found.  Did you forget to activate your virtualenv?'
if os.access(INSTALL_PYTHON, os.X_OK):
    CMD = [INSTALL_PYTHON, '-mpre_commit']
elif which('pre-commit'):
if which('pre-commit'):
    CMD = ['pre-commit']
else:
    raise SystemExit(DNE)