Add ruff lint step to CI (E9/F rules) and fix findings - #94
Open
bodono wants to merge 1 commit into
Open
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theCupyDenseSolver.update_diagNameError 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 thef"Failed to converge"placeholder-free f-string and annotates the deliberate backend re-export block indirect.pywithnoqa: F401(ruff's autofix initially removed it, which breaksdirect.ScipySolver-style access — caught by test collection and restored).