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).
This commit is contained in:
@@ -59,6 +59,8 @@ jobs:
|
|||||||
- run: pip install --no-cache-dir -r backend/requirements.lock -r backend/requirements-dev.txt
|
- run: pip install --no-cache-dir -r backend/requirements.lock -r backend/requirements-dev.txt
|
||||||
- name: ruff
|
- name: ruff
|
||||||
run: python -m ruff check --config backend/ruff.toml backend scripts
|
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
|
- name: pytest
|
||||||
run: python -m pytest
|
run: python -m pytest
|
||||||
working-directory: backend
|
working-directory: backend
|
||||||
|
|||||||
@@ -2,5 +2,11 @@
|
|||||||
# high-signal pyflakes/pycodestyle checks that catch real dead code + bugs), but ignores E402:
|
# 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
|
# 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.
|
# 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]
|
[lint]
|
||||||
ignore = ["E402"]
|
ignore = ["E402"]
|
||||||
|
|||||||
Reference in New Issue
Block a user