From 52afed327df5767e2c9a1b982d95538936588231 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Fri, 20 Feb 2026 14:56:29 -0600 Subject: [PATCH] =?UTF-8?q?CI:=20Bump=20ruff=20hook=20(0.15.0=20=E2=86=92?= =?UTF-8?q?=200.15.8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Adjust linter configuration to reuse legacy defaults --- .pre-commit-config.yaml | 2 +- pyproject.toml | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 580464f910..1825d34f6f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,7 +46,7 @@ repos: stages: [manual] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.0 + rev: v0.15.8 hooks: - id: ruff-check args: [--color=always] diff --git a/pyproject.toml b/pyproject.toml index b68613d9cb..f00b29327a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,20 +21,25 @@ preview = true fix = true [tool.ruff.lint] +# NOTE: Starting with `0.15.2`, ruff uses a SIGNIFICANTLY expanded set of default rules for +# preview builds. While expanding into these new rulesets is something we're interested in, +# we'll adopt them gradually, depending on our needs. As such, our base `select` utilizes the +# legacy defaults. +select = ["E4", "E7", "E9", "F"] extend-select = [ - "I", # isort - "UP006", # Use {to} instead of {from} for type annotation - "UP007", # Use `X | Y` for type annotations - "UP037", # Remove quotes from type annotation - "FA", # Future annotations + "FA", # flake8-future-annotations. + "I", # isort. + "UP006", # Use {to} instead of {from} for type annotation. + "UP007", # Use `X | Y` for type annotations. + "UP037", # Remove quotes from type annotation. ] -extend-safe-fixes = ["UP006", "UP007", "FA"] +extend-safe-fixes = ["FA", "UP006", "UP007"] [tool.ruff.lint.per-file-ignores] "{SConstruct,SCsub}" = [ - "E402", # Module level import not at top of file - "F403", # Undefined local with import star - "F405", # Undefined local with import star usage + "E402", # Module level import not at top of file. + "F403", # Undefined local with import star. + "F405", # Undefined local with import star usage. ] [tool.ruff.lint.isort]