-
Notifications
You must be signed in to change notification settings - Fork 128
Enable E741 ruff check #38319
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
Enable E741 ruff check #38319
Conversation
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.
Looks good, I just spotted some small things.
qt/python/mantidqtinterfaces/mantidqtinterfaces/drill/presenter/DrillPresenter.py
Outdated
Show resolved
Hide resolved
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.
Thanks for making those changes.
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.
I think we should check with more people before deciding whether to turn this rule on. It's quite common to e.g. loop over the indices h
, k
, and l
, and maybe we shouldn't be restricting this.
Framework/PythonInterface/plugins/algorithms/CylinderPaalmanPingsCorrection2.py
Outdated
Show resolved
Hide resolved
Framework/PythonInterface/plugins/algorithms/LoadNMoldyn3Ascii.py
Outdated
Show resolved
Hide resolved
I don't mind hugely, but it's a bit confusing to change just |
e8daad4
to
0bf569a
Compare
0bf569a
to
1818ac6
Compare
It was decided that the |
I merged without Tom's (in github) approval. The changes he requested were made. |
This is the changes from mantidproject#38319
Description of work
This PR fixes any remaining ruff E741 errors, documented here:
https://docs.astral.sh/ruff/rules/ambiguous-variable-name/
It also enables this check to run on all pull requests.
To test:
Code review - check that all changes look reasonable
Run ruff locally on all files using the following terminal command
Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.