mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 02:03:27 +01:00
Replace pre-commit by prek (#160427)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 "================"
|
||||
|
||||
@@ -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(":")
|
||||
|
||||
@@ -31,7 +31,7 @@ fi
|
||||
|
||||
script/bootstrap
|
||||
|
||||
pre-commit install
|
||||
prek install
|
||||
|
||||
hass --script ensure_config -c config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user