-
Notifications
You must be signed in to change notification settings - Fork 44
Fix or silence ruff check
warnings; add ruff check
to Github Actions
#246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Removed unused imports. Removed unused variables in test: these were cut-and-paste from other tests, and not needed for the tests in questions. Other minor fixes.
I like the general approach! Thanks @roryyorke! I would prefer not to override E741 (ambigous variable name) on single lines. I'd rather just switch it off globally. We use the single letter variable names where SLICOT uses them. |
slycot/analysis.py
Outdated
@@ -1838,7 +1838,7 @@ def ab13md(Z, nblock, itype, x=None): | |||
return bound, d, g, x[:m+mr-1] | |||
|
|||
|
|||
def ag08bd(l,n,m,p,A,E,B,C,D,equil='N',tol=0.0,ldwork=None): | |||
def ag08bd(l,n,m,p,A,E,B,C,D,equil='N',tol=0.0,ldwork=None): # noqa: E741 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just switch off E741 in a global option in pyproject.toml
[tool.ruff.lint]
ignore = [ "E741" ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. If it weren't backward incompatible I'd be tempted to change l
to ell
, but so it goes.
From what I see, all failures are on macos, and I think all macos jobs fail. I checked two at random, and the failure is in python-control TestStateSpace.test_pow:
|
not all macos tests fail; many pass, but 7 fail. |
Failing macOS tests are unrelated. Thanks @roryyorke |
Is this worth it at all?
Are the particular fixes I've made (especially
# noqa
ones) reasonable?