Switch from pylint+black to ruff#927
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bccf262049
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
only pylint rule missing in ruff is too-many-ancestors
fixes PLR5501 errors
fixes E713
# Conflicts: # SPRINTLOG.md
bccf262 to
cd2ad89
Compare
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install ruff | ||
| run: pip install ruff |
There was a problem hiding this comment.
Isn't it better pinning ruff to a certain version to avoid the check failing without code changes
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #927 +/- ##
=======================================
Coverage 54.45% 54.45%
=======================================
Files 33 33
Lines 3043 3043
=======================================
Hits 1657 1657
Misses 1386 1386 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull Request Template
Before Marking as Ready for Review
dev(or other targeted branch)SPRINTLOG.mdif neededIf the target branch is
master:Summary
As recommend in https://github.com/ScilifelabDataCentre/development-guidelines/blob/main/paved_path_tech/paved_path_tools.md#linting--static-analysis ruff is faster replacement of pylint and black.
It comes with even more rules that can be added gradually.
I would highly recommend to add the following rules:
One that recently turned out to be helpful for us at nf-core:
Related Issue/Ticket
Testing
Reviewer Notes
The only previously used pylint rule that is not yet covered in ruff is
too-many-ancestors.The rest should be 1:1 replacement of the previous settings.
I also bumped the targetVersion in the
pyproject.toml, feel free to revert.But python<3.10 reached end-of-life, last fall: https://devguide.python.org/versions/