mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 13:00:10 -06:00
move languages.all and languages.helpers out of languages
This commit is contained in:
@@ -2,14 +2,14 @@ from __future__ import annotations
|
||||
|
||||
from typing import Sequence
|
||||
|
||||
from pre_commit.languages import helpers
|
||||
from pre_commit import lang_base
|
||||
from pre_commit.prefix import Prefix
|
||||
|
||||
ENVIRONMENT_DIR = None
|
||||
get_default_version = helpers.basic_get_default_version
|
||||
health_check = helpers.basic_health_check
|
||||
install_environment = helpers.no_install
|
||||
in_env = helpers.no_env
|
||||
get_default_version = lang_base.basic_get_default_version
|
||||
health_check = lang_base.basic_health_check
|
||||
install_environment = lang_base.no_install
|
||||
in_env = lang_base.no_env
|
||||
|
||||
|
||||
def run_hook(
|
||||
@@ -22,9 +22,9 @@ def run_hook(
|
||||
require_serial: bool,
|
||||
color: bool,
|
||||
) -> tuple[int, bytes]:
|
||||
cmd = helpers.hook_cmd(entry, args)
|
||||
cmd = lang_base.hook_cmd(entry, args)
|
||||
cmd = (prefix.path(cmd[0]), *cmd[1:])
|
||||
return helpers.run_xargs(
|
||||
return lang_base.run_xargs(
|
||||
cmd,
|
||||
file_args,
|
||||
require_serial=require_serial,
|
||||
|
||||
Reference in New Issue
Block a user