From 20fee95a9ab5d57de347ddb54b0ea02fb339506c Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Fri, 20 Feb 2026 14:40:45 +0100 Subject: [PATCH] Closes #21499: Restore deterministic Ruff linting (match Ruff 0.15.1 preview defaults) Explicitly set `select` rules to maintain compatibility with Ruff 0.15.1. Ensures deterministic linting behavior despite changes in Ruff 0.15.2 defaults. See https://github.com/astral-sh/ruff/releases/tag/0.15.2 for more details. --- ruff.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruff.toml b/ruff.toml index 5fbfd0090..a9c2b4b01 100644 --- a/ruff.toml +++ b/ruff.toml @@ -30,6 +30,10 @@ respect-gitignore = true target-version = "py312" [lint] +# Pin the effective default rule set used with `preview = true` to match Ruff 0.15.1. +# Ruff 0.15.2 changed the preview defaults, see https://github.com/astral-sh/ruff/releases/tag/0.15.2 +# Keeping this explicit makes ruff deterministic. +select = ["E4", "E7", "E9", "F"] extend-select = [ "E1", # pycodestyle errors: indentation-related (e.g., unexpected/missing indent) "E2", # pycodestyle errors: whitespace-related (e.g., missing whitespace, extra spaces)