mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Simplify a few things
This commit is contained in:
parent
b707cbba06
commit
931c69b3fa
7 changed files with 29 additions and 97 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue