mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
Allow multiple hooks with same id in .pre-commit-config.yaml
This commit is contained in:
parent
32b662c35f
commit
62f13aea56
5 changed files with 26 additions and 22 deletions
|
|
@ -43,7 +43,7 @@ def _update_repository(repo_config, runner):
|
|||
new_repo = Repository.create(new_config, runner.store)
|
||||
|
||||
# See if any of our hooks were deleted with the new commits
|
||||
hooks = set(repo.hooks.keys())
|
||||
hooks = set(hook_id for hook_id, _ in repo.hooks)
|
||||
hooks_missing = hooks - (hooks & set(new_repo.manifest.hooks.keys()))
|
||||
if hooks_missing:
|
||||
raise RepositoryCannotBeUpdatedError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue