mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
remove None overload for environment_dir
This commit is contained in:
parent
017fa5c0b8
commit
f0baffb01f
2 changed files with 10 additions and 19 deletions
|
|
@ -50,15 +50,16 @@ def _write_state(prefix: Prefix, venv: str, state: object) -> None:
|
|||
|
||||
def _hook_installed(hook: Hook) -> bool:
|
||||
lang = languages[hook.language]
|
||||
if lang.ENVIRONMENT_DIR is None:
|
||||
return True
|
||||
|
||||
venv = environment_dir(lang.ENVIRONMENT_DIR, hook.language_version)
|
||||
return (
|
||||
venv is None or (
|
||||
(
|
||||
_read_state(hook.prefix, venv) ==
|
||||
_state(hook.additional_dependencies)
|
||||
) and
|
||||
not lang.health_check(hook.prefix, hook.language_version)
|
||||
)
|
||||
(
|
||||
_read_state(hook.prefix, venv) ==
|
||||
_state(hook.additional_dependencies)
|
||||
) and
|
||||
not lang.health_check(hook.prefix, hook.language_version)
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue