Simplify a few things

This commit is contained in:
Anthony Sottile 2015-01-14 19:21:32 -08:00
parent b707cbba06
commit 931c69b3fa
7 changed files with 29 additions and 97 deletions

View file

@ -10,7 +10,6 @@ from pre_commit import git
from pre_commit.clientlib.validate_config import load_config
from pre_commit.repository import Repository
from pre_commit.store import Store
from pre_commit.util import resource_filename
class Runner(object):
@ -55,28 +54,6 @@ class Runner(object):
def pre_push_path(self):
return self.get_hook_path('pre-push')
@cached_property
def pre_template(self):
return resource_filename('hook-tmpl')
@cached_property
def pre_push_template(self):
return resource_filename('pre-push-tmpl')
@property
def pre_commit_legacy_path(self):
"""The path in the 'hooks' directory representing the temporary
storage for existing pre-commit hooks.
"""
return self.pre_commit_path + '.legacy'
@property
def pre_push_legacy_path(self):
"""The path in the 'hooks' directory representing the temporary
storage for existing pre-push hooks.
"""
return self.pre_push_path + '.legacy'
@cached_property
def cmd_runner(self):
# TODO: remove this and inline runner.store.cmd_runner