Skip to content

chore(ci): adopt ruff 0.16 and lift the <0.16 pin #314

Description

@smaramwbc

Context

#313 pinned ruff to >=0.15.21,<0.16 to restore CI. ruff 0.16.0 (allowed by the previous loose <1 bound) turned on new default rules that fail ruff check server/ tests/ on existing, intentional code, which was blocking every PR (#310, #311, #312).

The pin is a temporary hold, not a forward fix — this issue tracks adopting ruff 0.16 deliberately so we're not stuck on 0.15 indefinitely.

What to do

  1. Bump the constraint to the 0.16 line (e.g. ruff>=0.16,<0.17).
  2. Run ruff check server/ tests/ under 0.16 and resolve the new diagnostics — decide per rule:
    • BLE001 (blind except Exception, e.g. server/api/admin.py) — narrow the exception where practical, # noqa where the broad catch is intentional, or add BLE to ignore in [tool.ruff.lint] if we don't want the rule.
    • S110 (try/except/pass without logging) — add logging or ignore per the same call.
    • I001 (import sort) — ruff check --fix handles this automatically.
  3. Keep the linter pinned to a minor line going forward (don't let it float back to <1), so a future ruff minor can't break CI mid-PR again.

Priority

Low / non-urgent — CI is already unblocked by #313. This is cleanup only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions