-
Notifications
You must be signed in to change notification settings - Fork 259
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
Use Ruff for linting #3089
Use Ruff for linting #3089
Conversation
Release/3.14.1 into develop
.github/workflows/build.yml
Outdated
- name: Run linter (ruff) | ||
uses: chartboost/ruff-action@v1 |
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.
What is the advantage of using this action over just make lint
(which will now call ruff, too)?
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.
None, I guess. I will change it to be consistent, making sure we use the same version we have pinned.
Makefile
Outdated
format: | ||
black aleph/ | ||
|
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.
Hm, but black doesn’t replace a formatter, right?
As a project, Ruff is designed to be used alongside Black and, as such, will defer implementing stylistic lint rules that are obviated by autoformatting.
https://beta.ruff.rs/docs/faq/#is-ruff-compatible-with-black
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.
You are totally right, my bad. Reverting this.
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.
Left two comments/questions, but in general, I like ruff and am fine with whatever tooling everyone else prefers :)
Thanks for your careful review and great comments. I've made the changes and adapted the corresponding |
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.
🎉
https://github.com/charliermarsh/ruff replaces flake8 + black (and can also auto-fix lots of things).