mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Small cleanups
This commit is contained in:
parent
e717df0ba8
commit
18c9e061d8
17 changed files with 40 additions and 58 deletions
|
|
@ -32,8 +32,7 @@ def _get_skips(environ):
|
|||
|
||||
def _hook_msg_start(hook, verbose):
|
||||
return '{}{}'.format(
|
||||
'[{}] '.format(hook['id']) if verbose else '',
|
||||
hook['name'],
|
||||
'[{}] '.format(hook['id']) if verbose else '', hook['name'],
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -99,8 +98,7 @@ def _run_single_hook(filenames, hook, repo, args, skips, cols):
|
|||
'git', 'diff', '--no-ext-diff', retcode=None, encoding=None,
|
||||
)
|
||||
retcode, stdout, stderr = repo.run_hook(
|
||||
hook,
|
||||
tuple(filenames) if hook['pass_filenames'] else (),
|
||||
hook, tuple(filenames) if hook['pass_filenames'] else (),
|
||||
)
|
||||
diff_after = cmd_output(
|
||||
'git', 'diff', '--no-ext-diff', retcode=None, encoding=None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue