From 8d543c436a97fc1121ce15a0e0f05f8b4478a7aa Mon Sep 17 00:00:00 2001 From: thc1006 <84045975+thc1006@users.noreply.github.com> Date: Sun, 9 Aug 2026 02:42:25 +0800 Subject: [PATCH] CI: pin the linters, so a release cannot turn a branch red `pip install pylint ruff` takes whatever is newest, and both tools decide whether this job passes. That already happened: recent ruff formats Python code blocks inside Markdown, which it did not use to, so master's README stopped matching `ruff format --check` without anyone touching it. Any pull request into master now shows a red lint for a reason unrelated to it. pylint has the same shape and a wider blast radius. `.pylintrc` disables named messages rather than enabling named ones, so a new release's new checks are on by default, and CI reads the exit code rather than the score. Pinned to what CI installs today, verified against develop before pinning: ruff 0.16.2 reports 307 files already formatted and no lint findings, pylint 4.0.6 exits 0. This makes bumping them a deliberate change rather than something that arrives with a red branch. Renovate manages the dependencies declared in pyproject and requirements, and has not raised a pull request for a pinned version inside a workflow, so these will need bumping by hand or a rule adding for them. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> --- .github/workflows/linters.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 3e5a3e81d..965660931 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -28,7 +28,12 @@ jobs: python -m pip install --upgrade pip pip install .[all] pip install .[tests] - pip install pylint ruff + # Pinned, because both decide whether this job passes and both change + # what they report between releases. Unpinned, the formatter widening + # its scope or pylint adding a check turns a branch red with no commit + # to explain it. Bumping these is a deliberate change, made when the + # tree is ready for what the new version says. + pip install "pylint==4.0.6" "ruff==0.16.2" - name: Ruff (lint) run: ruff check --output-format=github . - name: Ruff (format)