From 83f3b3e3ebe8af80c7d41e991255a0c115bd6203 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Wed, 10 Sep 2025 20:48:31 +0200 Subject: [PATCH] Bump ruff to 0.13.0 (#152067) --- .pre-commit-config.yaml | 2 +- pyproject.toml | 9 ++++++--- requirements_test_pre_commit.txt | 2 +- script/hassfest/docker/Dockerfile | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d87187b55be..982b73084f0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.1 + rev: v0.13.0 hooks: - id: ruff-check args: diff --git a/pyproject.toml b/pyproject.toml index 94050674286..836aee6e8a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -637,7 +637,7 @@ exclude_lines = [ ] [tool.ruff] -required-version = ">=0.12.1" +required-version = ">=0.13.0" [tool.ruff.lint] select = [ @@ -779,8 +779,7 @@ ignore = [ "TRY003", # Avoid specifying long messages outside the exception class "TRY400", # Use `logging.exception` instead of `logging.error` - # Ignored due to performance: https://github.com/charliermarsh/ruff/issues/2923 - "UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)` + "UP046", # Non PEP 695 generic class "UP047", # Non PEP 696 generic function "UP049", # Avoid private type parameter names @@ -798,6 +797,10 @@ ignore = [ # Disabled because ruff does not understand type of __all__ generated by a function "PLE0605", + + "PYI059", + "PYI061", + "FURB116" ] [tool.ruff.lint.flake8-import-conventions.extend-aliases] diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index b9c800be3ca..44689bd12fe 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -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.12.1 +ruff==0.13.0 yamllint==1.37.1 diff --git a/script/hassfest/docker/Dockerfile b/script/hassfest/docker/Dockerfile index 24e0fd24501..18550535fbe 100644 --- a/script/hassfest/docker/Dockerfile +++ b/script/hassfest/docker/Dockerfile @@ -27,7 +27,7 @@ RUN --mount=from=ghcr.io/astral-sh/uv:0.8.9,source=/uv,target=/bin/uv \ stdlib-list==0.10.0 \ pipdeptree==2.26.1 \ tqdm==4.67.1 \ - ruff==0.12.1 \ + ruff==0.13.0 \ PyTurboJPEG==1.8.0 \ go2rtc-client==0.2.1 \ ha-ffmpeg==3.2.2 \