Skip to content

Extend the maximal-strictness lint program: remaining judgement families (B, TRY, RET, ARG, PTH, N, ERA, FBT, DTZ, S-rest) #239

Description

@cdeust

Continuation of the #197 program after its acceptance criteria closed (six families landed as blocking gates: S110, BLE001, PLR2004, E501, PLC0415, S608; pyright at zero diagnostics).

What

Triage and enable, one family per PR under the program's established bar (every finding fixed or carrying a per-site named justification — never blanket-ignored), the judgement families that remain unselected:

family findings in mcp_server/ (measured 2026-07-28, ruff 0.15.20)
B (bugbear) 16
TRY (tryceratops) 163
RET (return discipline) 20
ARG (unused arguments) 53
PTH (pathlib) 91
N (naming) 43
ERA (commented-out code) 43
FBT (boolean traps) 254
DTZ (naive datetimes) 4
S* beyond S110/S608 34

The rewrite-suggestion families (UP 91, C4 13, SIM 68, PIE 10, RSE 1, PERF 94, RUF 725) and the rejected style families (D, ANN, COM, TD, I) carry their written rationale in pyproject.toml [tool.ruff.lint] and are out of scope here unless that rationale is revisited.

Acceptance criteria

  1. Each enabled family lands in its own PR with zero blanket ignores; per-site # noqa: <rule> — <reason> only where the finding is deliberate.
  2. pyproject.toml's exclusion-rationale block shrinks accordingly; a family that stays excluded gets its reason upgraded from "not yet triaged" to a deliberate rejection.
  3. CI stays green at every step; ruff check . clean at each new set.

Refs #197.

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