mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Apply defaults to all of the configs. Much fewer .get()s
This commit is contained in:
parent
b23ad5d6a3
commit
ac67af21ec
13 changed files with 73 additions and 48 deletions
|
|
@ -38,7 +38,7 @@ def _run_single_hook(runner, repository, hook_id, all_files=False):
|
|||
get_filenames(hook['files']),
|
||||
)
|
||||
|
||||
if retcode != repository.hooks[hook_id].get('expected_return_value', 0):
|
||||
if retcode != repository.hooks[hook_id]['expected_return_value']:
|
||||
output = '\n'.join([stdout, stderr]).strip()
|
||||
retcode = 1
|
||||
color = RED
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue