mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Implement default_language_version
This commit is contained in:
parent
579b05e424
commit
d3b5a41830
23 changed files with 150 additions and 103 deletions
|
|
@ -7,10 +7,10 @@ import shlex
|
|||
|
||||
import six
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.xargs import xargs
|
||||
|
||||
|
||||
FIXED_RANDOM_SEED = 1542676186
|
||||
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ def to_cmd(hook):
|
|||
|
||||
|
||||
def assert_version_default(binary, version):
|
||||
if version != 'default':
|
||||
if version != C.DEFAULT:
|
||||
raise AssertionError(
|
||||
'For now, pre-commit requires system-installed {}'.format(binary),
|
||||
)
|
||||
|
|
@ -45,7 +45,7 @@ def assert_no_additional_deps(lang, additional_deps):
|
|||
|
||||
|
||||
def basic_get_default_version():
|
||||
return 'default'
|
||||
return C.DEFAULT
|
||||
|
||||
|
||||
def basic_healthy(prefix, language_version):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue