mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Enable map configurations (config v2).
This commit is contained in:
parent
ef8347cf2d
commit
3e76cdaf25
11 changed files with 70 additions and 52 deletions
|
|
@ -40,11 +40,11 @@ class Runner(object):
|
|||
@cached_property
|
||||
def repositories(self):
|
||||
"""Returns a tuple of the configured repositories."""
|
||||
config = load_config(self.config_file_path)
|
||||
repositories = tuple(Repository.create(x, self.store) for x in config)
|
||||
for repository in repositories:
|
||||
repository.require_installed()
|
||||
return repositories
|
||||
repos = load_config(self.config_file_path)['repos']
|
||||
repos = tuple(Repository.create(x, self.store) for x in repos)
|
||||
for repo in repos:
|
||||
repo.require_installed()
|
||||
return repos
|
||||
|
||||
def get_hook_path(self, hook_type):
|
||||
return os.path.join(self.git_dir, 'hooks', hook_type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue