mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
deprecate python_venv language
This commit is contained in:
parent
0359fae2da
commit
0c1267b214
8 changed files with 73 additions and 29 deletions
|
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||
import json
|
||||
import logging
|
||||
import os
|
||||
import shlex
|
||||
from typing import Any
|
||||
from typing import Sequence
|
||||
|
||||
|
|
@ -68,6 +69,14 @@ def _hook_install(hook: Hook) -> None:
|
|||
logger.info('Once installed this environment will be reused.')
|
||||
logger.info('This may take a few minutes...')
|
||||
|
||||
if hook.language == 'python_venv':
|
||||
logger.warning(
|
||||
f'`repo: {hook.src}` uses deprecated `language: python_venv`. '
|
||||
f'This is an alias for `language: python`. '
|
||||
f'Often `pre-commit autoupdate --repo {shlex.quote(hook.src)}` '
|
||||
f'will fix this.',
|
||||
)
|
||||
|
||||
lang = languages[hook.language]
|
||||
assert lang.ENVIRONMENT_DIR is not None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue