Switch to using ruff, re: python project template#140
Merged
glass-ships merged 7 commits intonextfrom Feb 17, 2025
Merged
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #140 +/- ##
==========================================
- Coverage 63.78% 63.76% -0.03%
==========================================
Files 118 118
Lines 9882 9876 -6
==========================================
- Hits 6303 6297 -6
Misses 3579 3579 ☔ View full report in Codecov by Sentry. |
jmborr
requested changes
Feb 16, 2025
Member
jmborr
left a comment
There was a problem hiding this comment.
There's Ruff messing with the the standard / third-party / RefRed partition of imports.
Also, I'd switch back to single-quotes. In pyproject.toml:
[tool.ruff.format]
quote-style = "single"
Member
Author
Is there a particular reason for this preference? I chose double here to be consistent with all other neutrons projects and the python project template |
jmborr
approved these changes
Feb 17, 2025
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.
Quick PR to convert to using Ruff, to be consistent with https://github.com/neutrons/python_project_template
Note that the standard list of included rules found 113 errors that would require a not insignificant change of multiple variable names, function arguments, etc. that may break current functionality.
The specific rules were instead added to ruff's ignore list for now - the necessary changes can be made downstream in a separate PR if we decide that's necessary.