mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Implement default_stages
This commit is contained in:
parent
9c6a1d80d6
commit
bd65d8947f
4 changed files with 29 additions and 3 deletions
|
|
@ -252,7 +252,7 @@ def run(config_file, store, args, environ=os.environ):
|
|||
hook
|
||||
for hook in all_hooks(config, store)
|
||||
if not args.hook or hook.id == args.hook or hook.alias == args.hook
|
||||
if not hook.stages or args.hook_stage in hook.stages
|
||||
if args.hook_stage in hook.stages
|
||||
]
|
||||
|
||||
if args.hook and not hooks:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue