mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-05-06 23:39:13 -05:00
@@ -3,7 +3,6 @@ from __future__ import annotations
|
||||
import os
|
||||
from typing import Sequence
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.languages.all import Language
|
||||
from pre_commit.prefix import Prefix
|
||||
|
||||
@@ -14,11 +13,12 @@ def run_language(
|
||||
exe: str,
|
||||
args: Sequence[str] = (),
|
||||
file_args: Sequence[str] = (),
|
||||
version: str = C.DEFAULT,
|
||||
version: str | None = None,
|
||||
deps: Sequence[str] = (),
|
||||
is_local: bool = False,
|
||||
) -> tuple[int, bytes]:
|
||||
prefix = Prefix(str(path))
|
||||
version = version or language.get_default_version()
|
||||
|
||||
language.install_environment(prefix, version, deps)
|
||||
with language.in_env(prefix, version):
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
- id: rust-hook
|
||||
name: rust example hook
|
||||
entry: rust-hello-world
|
||||
language: rust
|
||||
files: ''
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
[[package]]
|
||||
name = "rust-hello-world"
|
||||
version = "0.1.0"
|
||||
@@ -1,3 +0,0 @@
|
||||
[package]
|
||||
name = "rust-hello-world"
|
||||
version = "0.1.0"
|
||||
@@ -1,3 +0,0 @@
|
||||
fn main() {
|
||||
println!("hello world");
|
||||
}
|
||||
Reference in New Issue
Block a user