Replace pre-commit by prek (#160427)

This commit is contained in:
Robert Resch
2026-01-13 15:09:02 +01:00
committed by GitHub
parent cc30add73a
commit ea7e94bcc1
10 changed files with 34 additions and 169 deletions

View File

@@ -427,7 +427,7 @@ def validate(integrations: dict[str, Integration], config: Config) -> None:
if config.action == "generate" and manifests_resorted:
subprocess.run(
[
"pre-commit",
"prek",
"run",
"--hook-stage",
"manual",

View File

@@ -15,7 +15,7 @@ printf "%s\n" $files
echo "=============="
echo "LINT with ruff"
echo "=============="
pre-commit run ruff-check --files $files
prek run ruff-check --files $files
echo "================"
echo "LINT with pylint"
echo "================"

View File

@@ -119,7 +119,7 @@ async def pylint(files):
async def ruff(files):
"""Exec ruff."""
_, log = await async_exec("pre-commit", "run", "ruff", "--files", *files)
_, log = await async_exec("prek", "run", "ruff", "--files", *files)
res = []
for line in log.splitlines():
line = line.split(":")

View File

@@ -31,7 +31,7 @@ fi
script/bootstrap
pre-commit install
prek install
hass --script ensure_config -c config