mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-14 17:41:45 +04:00
make flake and mypy happier
This commit is contained in:
parent
9583b19216
commit
0c54b4772b
1 changed files with 9 additions and 3 deletions
|
|
@ -5,11 +5,14 @@ import os
|
|||
import shutil
|
||||
from collections.abc import Generator
|
||||
from collections.abc import Sequence
|
||||
from typing import Union
|
||||
|
||||
from pre_commit import lang_base
|
||||
from pre_commit.envcontext import _Unset
|
||||
from pre_commit.envcontext import envcontext
|
||||
from pre_commit.envcontext import PatchesT
|
||||
from pre_commit.envcontext import UNSET
|
||||
from pre_commit.envcontext import Var
|
||||
from pre_commit.prefix import Prefix
|
||||
from pre_commit.util import cmd_output_b
|
||||
|
||||
|
|
@ -46,8 +49,11 @@ def run_hook(
|
|||
)
|
||||
|
||||
|
||||
PatchEntry = tuple[str, Union[str, _Unset, tuple[Union[str, Var], ...]]]
|
||||
|
||||
|
||||
def get_env_patch(target_dir: str, version: str) -> PatchesT:
|
||||
patches = [
|
||||
patches: list[PatchEntry] = [
|
||||
('JULIA_LOAD_PATH', target_dir),
|
||||
('JULIA_PROJECT', UNSET),
|
||||
]
|
||||
|
|
@ -130,6 +136,6 @@ def install_environment(
|
|||
end
|
||||
"""
|
||||
cmd_output_b(
|
||||
'julia', '--startup-file=no', '-e', julia_code, '--', envdir, *additional_dependencies,
|
||||
cwd=prefix.prefix_dir,
|
||||
'julia', '--startup-file=no', '-e', julia_code, '--', envdir,
|
||||
*additional_dependencies, cwd=prefix.prefix_dir,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue