-
Notifications
You must be signed in to change notification settings - Fork 8
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
Swap python linter and formatter to ruff #231
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.
Thanks, this is great!
Let's embrace the black-like default config and set the line length to 88. With the popularity of black, most users likely have python rulers set to 88 these days.
We should also update style.rst
to reference ruff
instead of yapf
and remove references to the yapf plugins.
Done - everything should be sorted now! |
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!
Description
Flake8
andyapf
have been replaced with a minimalruff
config. Autofixes have been applied, and manual fixes have been implemented where necessary.pre-commit
has been updated to use ruff.Motivation and context
In addition to the increased performance, using
ruff
brings fresnel's python tooling up to spec with most other glotzerlab packages. Note that the config options selected here match the previous flake8 selections, with the exception of the RST rules which are not supported. Additional (more opinionated) options can be added in a future PR.Change log
Checklist: