-
Notifications
You must be signed in to change notification settings - Fork 23
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
Lint Python code with ruff #189
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.
Hi @cclauss, thanks for the PR. I've heard good things about Ruff and this is mostly a welcome change. I have some comments, mostly around the configuration in pyproject.toml
.
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 went through the Ruff rule sets to better understand what was being included. Most seemed moderately useful, but a handful were irrelevant, some partially overlapped with others, and some capture strange errors I would not likely make. So I think it makes more sense to start with a small set of rules and later add the ones that need it. Furthermore, I looked through the popular projects that Ruff advertises as using it, and all of them had small sets (~5) of rule categories, so I'd like to follow their example until I'm more familiar with the tool.
@cclauss Thanks for making those changes. I don't think there's any further reason to delay this, so I've merged it. More rules could be added in the future as needed. And thanks again for taking the initiative and making the PR! |
Ruff supports over 600 lint rules and can be used to replace Flake8 (plus dozens of plugins), isort, pydocstyle, yesqa, eradicate, pyupgrade, and autoflake, all while executing (in Rust) tens or hundreds of times faster than any individual tool.