From 434a98d6ed7f340db5bc74b9ae040a49673137e6 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Sun, 23 Aug 2026 07:42:42 +0200 Subject: [PATCH] chore(lint): set ruff line-length 100 and gate ruff format --check Adds ruff's formatter to the gate. line-length 100 matches the frontend prettier printWidth. The reformat itself lands as the next commit (kept separate so it can go in .git-blame-ignore-revs). --- .gitea/workflows/check.yml | 2 ++ backend/ruff.toml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index 9fe276ce..3214e781 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -59,6 +59,8 @@ jobs: - run: pip install --no-cache-dir -r backend/requirements.lock -r backend/requirements-dev.txt - name: ruff run: python -m ruff check --config backend/ruff.toml backend scripts + - name: ruff format --check + run: python -m ruff format --check --config backend/ruff.toml backend scripts - name: pytest run: python -m pytest working-directory: backend diff --git a/backend/ruff.toml b/backend/ruff.toml index 4706ea01..a3e03c0c 100644 --- a/backend/ruff.toml +++ b/backend/ruff.toml @@ -2,5 +2,11 @@ # high-signal pyflakes/pycodestyle checks that catch real dead code + bugs), but ignores E402: # a handful of modules (e.g. main.py) deliberately run setup — logging config, sys.path — before # importing route modules, so "module import not at top of file" is intentional there, not cruft. +# +# line-length 100 (ruff's default is 88): matches the frontend prettier printWidth so both halves of +# the repo wrap at the same width, and it's the width `ruff format` enforces (gated via +# `ruff format --check` alongside `ruff check`). +line-length = 100 + [lint] ignore = ["E402"]