From 8432624036378342f033863eb859bbd739a6df2c Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Thu, 30 Jul 2026 14:13:40 -0400 Subject: [PATCH] ci: pin ruff select to the intended F + core-E policy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ruff workflow runs `ruff check src/ bin/` on every PR but never on main, so main accumulated ~400 lint findings that failed CI on every subsequent PR regardless of the diff. The config set `ignore` but never pinned `select`, and its own comment states the intent is "F + other E" — under exactly that policy the codebase is clean (0 findings). Without an explicit select, newer ruff enabled ~10 extra rule families (pyupgrade `List`->`list` alone is ~310 of the findings), none of them real F/E issues. Pin `select = ["E4","E7","E9","F"]` to match the documented intent and make it stable across ruff default changes. Greens CI with zero code changes. Opting into pyupgrade/import-sort/etc. later is a deliberate choice + its own cleanup. Verified: `ruff check src/ bin/` → All checks passed. Co-Authored-By: Claude Opus 4.8 --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 7e6d4f7..8d8ec4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,12 @@ line-length = 88 # Adjust line length as needed target-version = ['py39'] [tool.ruff.lint] +# Enforce the intended policy explicitly: pyflakes (F) + core pycodestyle +# (E4 import, E7 statement, E9 syntax). Pinning `select` keeps enforcement +# stable across ruff default changes — without it, newer ruff enabled ~10 extra +# rule families (pyupgrade, import-sort, etc.), 400+ purely-stylistic findings +# that were never the intent and failed CI on every PR. +select = ["E4", "E7", "E9", "F"] # The codebase uses one-line guard/assignment statements pervasively # (`if cond: continue`, `a = x; b = y`). Those stylistic rules (E701/E702) are # ignored to match existing style; real issues (F, other E) stay enforced.