mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Fixed code style
This commit is contained in:
parent
c148845a98
commit
02d95c033c
2 changed files with 12 additions and 3 deletions
|
|
@ -285,7 +285,11 @@ def run(config_file, store, args, environ=os.environ):
|
||||||
]
|
]
|
||||||
|
|
||||||
if args.hook and not hooks:
|
if args.hook and not hooks:
|
||||||
output.write_line('No hook with id `{}` in stage `{}`'.format(args.hook, args.hook_stage))
|
output.write_line(
|
||||||
|
'No hook with id `{}` in stage `{}`'.format(
|
||||||
|
args.hook, args.hook_stage,
|
||||||
|
),
|
||||||
|
)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
install_hook_envs(hooks, store)
|
install_hook_envs(hooks, store)
|
||||||
|
|
|
||||||
|
|
@ -231,12 +231,17 @@ def test_show_diff_on_failure(
|
||||||
({}, (b'Bash hook', b'Passed'), 0, True),
|
({}, (b'Bash hook', b'Passed'), 0, True),
|
||||||
({'verbose': True}, (b'foo.py\nHello World',), 0, True),
|
({'verbose': True}, (b'foo.py\nHello World',), 0, True),
|
||||||
({'hook': 'bash_hook'}, (b'Bash hook', b'Passed'), 0, True),
|
({'hook': 'bash_hook'}, (b'Bash hook', b'Passed'), 0, True),
|
||||||
({'hook': 'nope'}, (b'No hook with id `nope` in stage `commit`',), 1, True),
|
(
|
||||||
|
{'hook': 'nope'},
|
||||||
|
(b'No hook with id `nope` in stage `commit`',),
|
||||||
|
1,
|
||||||
|
True,
|
||||||
|
),
|
||||||
(
|
(
|
||||||
{'hook': 'nope', 'hook_stage': 'push'},
|
{'hook': 'nope', 'hook_stage': 'push'},
|
||||||
(b'No hook with id `nope` in stage `push`',),
|
(b'No hook with id `nope` in stage `push`',),
|
||||||
1,
|
1,
|
||||||
True
|
True,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
{'all_files': True, 'verbose': True},
|
{'all_files': True, 'verbose': True},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue