From 40be06dd392816400c02b989d0d8a40917d260e4 Mon Sep 17 00:00:00 2001 From: Vinicius Queiroz Date: Tue, 11 Aug 2026 17:58:51 -0300 Subject: [PATCH] fix(ci): declare the lint surface so a ruff default change cannot break main The Lint step on this PR failed with 67 findings and nothing in the repo caused it. pyproject had no [tool.ruff] section at all and declared `ruff>=0.5` with no ceiling, so the lint surface was whatever ruff defaulted to. ruff 0.16 widened that set and CI installs 0.16.2. Proved by removal on this tree with the version CI uses: with the select block, `ruff check src tests` is clean; stash it and the same command reports 67 errors (UP031, E402, BLE001, I001, SIM114, RUF100). None are new code, they are rules that were never selected. Declares select = ["E4", "E7", "E9", "F"], what the repo was already held to, rather than capping ruff: a cap freezes the tool and leaves the surface implicit, so the break returns the day someone lifts it. Same call as vinicq/falsegreen#148. Full suite verified in a clean venv with `pip install -e ".[dev]"`: 257 passed. --- pyproject.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 925204d..0f807be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,3 +42,13 @@ packages = ["src/falsegreen_robot"] [tool.pytest.ini_options] testpaths = ["tests"] + +[tool.ruff.lint] +# The lint surface is declared here instead of inherited from whatever ruff +# happens to default to. It used to be inherited, and ruff 0.16 widened its +# defaults: with `ruff>=0.5` unpinned, CI went from clean to a wall of findings +# (UP031, E402, BLE001, I001, SIM114, RUF100) with no commit in between. These +# four sets are exactly what the repo was already being held to. Adopting a wider +# set is a deliberate change with its own PR, not something a dependency release +# decides. Same fix as vinicq/falsegreen#148. +select = ["E4", "E7", "E9", "F"]