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:
Marc Mueller
2025-06-02 16:01:10 +02:00
committed by GitHub
parent 93b8cc38d8
commit ab7c7b8d89
7 changed files with 13 additions and 8 deletions

View File

@ -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 "