mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use Hook api in languages
This commit is contained in:
parent
5f9a667470
commit
b59d7197ff
18 changed files with 41 additions and 38 deletions
|
|
@ -26,7 +26,7 @@ def environment_dir(ENVIRONMENT_DIR, language_version):
|
|||
|
||||
|
||||
def to_cmd(hook):
|
||||
return tuple(shlex.split(hook['entry'])) + tuple(hook['args'])
|
||||
return tuple(shlex.split(hook.entry)) + tuple(hook.args)
|
||||
|
||||
|
||||
def assert_version_default(binary, version):
|
||||
|
|
@ -57,7 +57,7 @@ def no_install(prefix, version, additional_dependencies):
|
|||
|
||||
|
||||
def target_concurrency(hook):
|
||||
if hook['require_serial'] or 'PRE_COMMIT_NO_CONCURRENCY' in os.environ:
|
||||
if hook.require_serial or 'PRE_COMMIT_NO_CONCURRENCY' in os.environ:
|
||||
return 1
|
||||
else:
|
||||
# Travis appears to have a bunch of CPUs, but we can't use them all.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue