mirror of
https://github.com/home-assistant/core.git
synced 2025-06-24 17:11:53 +02:00
Update ruff to 0.11.12 (#146037)
* Update ruff to 0.11.12 * Replace ruff legacy alias with ruff-check
This commit is contained in:
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -360,7 +360,7 @@ jobs:
|
||||
- name: Run ruff
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
pre-commit run --hook-stage manual ruff --all-files --show-diff-on-failure
|
||||
pre-commit run --hook-stage manual ruff-check --all-files --show-diff-on-failure
|
||||
env:
|
||||
RUFF_OUTPUT_FORMAT: github
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.11.0
|
||||
rev: v0.11.12
|
||||
hooks:
|
||||
- id: ruff
|
||||
- id: ruff-check
|
||||
args:
|
||||
- --fix
|
||||
- id: ruff-format
|
||||
|
2
.vscode/tasks.json
vendored
2
.vscode/tasks.json
vendored
@ -45,7 +45,7 @@
|
||||
{
|
||||
"label": "Ruff",
|
||||
"type": "shell",
|
||||
"command": "pre-commit run ruff --all-files",
|
||||
"command": "pre-commit run ruff-check --all-files",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
|
2
requirements_test_pre_commit.txt
generated
2
requirements_test_pre_commit.txt
generated
@ -1,5 +1,5 @@
|
||||
# Automatically generated from .pre-commit-config.yaml by gen_requirements_all.py, do not edit
|
||||
|
||||
codespell==2.4.1
|
||||
ruff==0.11.0
|
||||
ruff==0.11.12
|
||||
yamllint==1.35.1
|
||||
|
@ -249,6 +249,10 @@ GENERATED_MESSAGE = (
|
||||
f"# Automatically generated by {Path(__file__).name}, do not edit\n\n"
|
||||
)
|
||||
|
||||
MAP_HOOK_ID_TO_PACKAGE = {
|
||||
"ruff-check": "ruff",
|
||||
}
|
||||
|
||||
IGNORE_PRE_COMMIT_HOOK_ID = (
|
||||
"check-executables-have-shebangs",
|
||||
"check-json",
|
||||
@ -523,7 +527,8 @@ def requirements_pre_commit_output() -> str:
|
||||
rev: str = repo["rev"]
|
||||
for hook in repo["hooks"]:
|
||||
if hook["id"] not in IGNORE_PRE_COMMIT_HOOK_ID:
|
||||
reqs.append(f"{hook['id']}=={rev.lstrip('v')}")
|
||||
pkg = MAP_HOOK_ID_TO_PACKAGE.get(hook["id"]) or hook["id"]
|
||||
reqs.append(f"{pkg}=={rev.lstrip('v')}")
|
||||
reqs.extend(x for x in hook.get("additional_dependencies", ()))
|
||||
output = [
|
||||
f"# Automatically generated "
|
||||
|
2
script/hassfest/docker/Dockerfile
generated
2
script/hassfest/docker/Dockerfile
generated
@ -24,7 +24,7 @@ RUN --mount=from=ghcr.io/astral-sh/uv:0.7.1,source=/uv,target=/bin/uv \
|
||||
--no-cache \
|
||||
-c /usr/src/homeassistant/homeassistant/package_constraints.txt \
|
||||
-r /usr/src/homeassistant/requirements.txt \
|
||||
stdlib-list==0.10.0 pipdeptree==2.26.1 tqdm==4.67.1 ruff==0.11.0 \
|
||||
stdlib-list==0.10.0 pipdeptree==2.26.1 tqdm==4.67.1 ruff==0.11.12 \
|
||||
PyTurboJPEG==1.8.0 go2rtc-client==0.1.3b0 ha-ffmpeg==3.2.2 hassil==2.2.3 home-assistant-intents==2025.5.28 mutagen==1.47.0 pymicro-vad==1.0.1 pyspeex-noise==1.0.2
|
||||
|
||||
LABEL "name"="hassfest"
|
||||
|
@ -15,7 +15,7 @@ printf "%s\n" $files
|
||||
echo "=============="
|
||||
echo "LINT with ruff"
|
||||
echo "=============="
|
||||
pre-commit run ruff --files $files
|
||||
pre-commit run ruff-check --files $files
|
||||
echo "================"
|
||||
echo "LINT with pylint"
|
||||
echo "================"
|
||||
|
Reference in New Issue
Block a user