mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 20:40:08 -06:00
Remove more properties from Runner
This commit is contained in:
@@ -218,7 +218,7 @@ class LocalRepository(Repository):
|
||||
else:
|
||||
return Prefix(self.store.make_local(deps))
|
||||
|
||||
@cached_property
|
||||
@property
|
||||
def manifest(self):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@@ -27,11 +27,7 @@ class Runner(object):
|
||||
os.chdir(root)
|
||||
return cls(root, config_file)
|
||||
|
||||
@cached_property
|
||||
def git_dir(self):
|
||||
return git.get_git_dir(self.git_root)
|
||||
|
||||
@cached_property
|
||||
@property
|
||||
def config_file_path(self):
|
||||
return os.path.join(self.git_root, self.config_file)
|
||||
|
||||
@@ -40,12 +36,4 @@ class Runner(object):
|
||||
return load_config(self.config_file_path)
|
||||
|
||||
def get_hook_path(self, hook_type):
|
||||
return os.path.join(self.git_dir, 'hooks', hook_type)
|
||||
|
||||
@cached_property
|
||||
def pre_commit_path(self):
|
||||
return self.get_hook_path('pre-commit')
|
||||
|
||||
@cached_property
|
||||
def pre_push_path(self):
|
||||
return self.get_hook_path('pre-push')
|
||||
return os.path.join(git.get_git_dir(self.git_root), 'hooks', hook_type)
|
||||
|
||||
@@ -7,8 +7,6 @@ import os.path
|
||||
import sqlite3
|
||||
import tempfile
|
||||
|
||||
from cached_property import cached_property
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit import file_lock
|
||||
from pre_commit.util import clean_path_on_failure
|
||||
@@ -173,6 +171,6 @@ class Store(object):
|
||||
'local', C.LOCAL_REPO_VERSION, deps, make_local_strategy,
|
||||
)
|
||||
|
||||
@cached_property
|
||||
@property
|
||||
def db_path(self):
|
||||
return os.path.join(self.directory, 'db.db')
|
||||
|
||||
Reference in New Issue
Block a user