mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +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
|
|
@ -6,7 +6,7 @@ def install_environment(repo_cmd_runner):
|
|||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
return repo_cmd_runner.run(
|
||||
['xargs', '{{prefix}}{0}'.format(hook['entry'])] + hook.get('args', []),
|
||||
['xargs', '{{prefix}}{0}'.format(hook['entry'])] + hook['args'],
|
||||
# TODO: this is duplicated in pre_commit/languages/helpers.py
|
||||
stdin='\n'.join(list(file_args) + ['']),
|
||||
retcode=None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue