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"]