X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pre_commit/all_languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,5 @@
'script': script,
'swift': swift,
'system': system,
# TODO: fully deprecate `python_venv`
'python_venv': python,
}
language_names = sorted(languages)
9 changes: 0 additions & 9 deletions pre_commit/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import json
import logging
import os
import shlex
from collections.abc import Sequence
from typing import Any

Expand Down Expand Up @@ -68,14 +67,6 @@ 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

Expand Down
7 changes: 0 additions & 7 deletions tests/all_languages_test.py

This file was deleted.

18 changes: 0 additions & 18 deletions tests/repository_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,6 @@ def _test_hook_repo(
assert out == expected


def test_python_venv_deprecation(store, caplog):
config = {
'repo': 'local',
'hooks': [{
'id': 'example',
'name': 'example',
'language': 'python_venv',
'entry': 'echo hi',
}],
}
_get_hook(config, store, 'example')
assert caplog.messages[-1] == (
'`repo: local` uses deprecated `language: python_venv`. '
'This is an alias for `language: python`. '
'Often `pre-commit autoupdate --repo local` will fix this.'
)


def test_system_hook_with_spaces(tempdir_factory, store):
_test_hook_repo(
tempdir_factory, store, 'system_hook_with_spaces_repo',
Expand Down
X Tutup