chore(ci): lint the whole repo, fix pre-existing alembic errors (#352) - #387
Conversation
…amwbc#352) Signed-off-by: Vignesh <vignesh.pavalur@gmail.com>
|
The failing check ( I don't have permission to re-run the job myself, so flagging here in |
|
Merged — thanks for the clean fix, this closes #352. I verified |
Description
CI only linted
server/andtests/;alembic/andscripts/werenever checked and had drifted — running
ruff check .finds 2 realpre-existing errors (an unused import in a migration file, and a
deliberate-but-unflagged E402 in
alembic/env.py).CONTRIBUTING.mdtells contributors to run
rufflocally without qualifying the path,so anyone running the obvious
ruff check .hits 2 failures on a cleancheckout and has to work out they're pre-existing. This fixes both
errors and widens CI to lint the whole repo.
Related Issue
Closes #352
Type of Change
Changes Made
import sqlalchemy as sainalembic/versions/0014_query_embedding_cache.py[tool.ruff.lint.per-file-ignores]inpyproject.tomlforalembic/env.py's deliberate late import (must run after the config comment block that resolvessqlalchemy.url), with a comment explaining whyruff check server/ tests/toruff check ., so new top-level directories don't silently go unlintedTesting
Test Commands Run
Checklist
Screenshots / Recordings
N/A — CI/lint config only.
ruff check .output is the proof:All checks passed!Additional Notes
Went with
ruff check .over explicitly listingscripts//alembic/alongside
server//tests/, per the issue's own reasoning:.stayscorrect as new top-level directories get added, where an explicit list
would need updating every time. No test changes needed since this is
lint/CI config only — verification is
ruff check .exiting 0, whichit does.
Fixes #352.