Skip to content

Add ruff lint step to CI (E9/F rules) and fix findings - #94

Open
bodono wants to merge 1 commit into
mainfrom
add-ci-lint
Open

Add ruff lint step to CI (E9/F rules) and fix findings#94
bodono wants to merge 1 commit into
mainfrom
add-ci-lint

Conversation

@bodono

@bodono bodono commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Adds a fast lint job (ruff check --select E9,F src/) — syntax errors, undefined names, unused imports, f-string mistakes; style rules deliberately excluded. The undefined-name rule statically catches the CupyDenseSolver.update_diag NameError class that no CI test can reach without a GPU runner (that fix is included here too, identical to the targeted PR, merging cleanly in either order). Also fixes the f"Failed to converge" placeholder-free f-string and annotates the deliberate backend re-export block in direct.py with noqa: F401 (ruff's autofix initially removed it, which breaks direct.ScipySolver-style access — caught by test collection and restored).

New lint job runs ruff check --select E9,F on src/: syntax errors,
undefined names, unused imports, f-string mistakes -- style rules
deliberately excluded. An undefined-name check catches the
CupyDenseSolver.update_diag NameError class statically, which no CI
test can reach without a GPU runner.

Findings fixed: the two F821 undefined 'cp' names in update_diag (also
fixed independently in the targeted GPU PR; identical change, merges
cleanly in either order), one F541 placeholder-free f-string, one
unused typing import, and the deliberate backend re-export block in
direct.py is annotated noqa: F401 (ruff's autofix removed it, which
broke the direct.ScipySolver access pattern; restored with markers).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant