Просмотр исходного кода

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.
Martin Hauser 19 часов назад
Родитель
Сommit
20fee95a9a
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      ruff.toml

+ 4 - 0
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)