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.
This commit is contained in:
Martin Hauser
2026-02-20 14:40:45 +01:00
committed by GitHub
parent d2002c64b4
commit 20fee95a9a

View File

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