Skip to content
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

Replace flake8, bugbear, isort, and pyupgrade with ruff #568

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Apr 19, 2023

Fixes: #569

Ruff supports over 500 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.

The ruff Action uses minimal steps to run in ~5 seconds, rapidly providing intuitive GitHub Annotations to contributors.

image

Running the complete test matrix on GitHub Actions takes a lot of time and CPU. Given that the ruff linting job is so fast (~5 seconds) let's ensure that linting passes before the complete test matrix is run. This will cost a few seconds on each run but could save a lot of time and contention for PRs that should be cleaned up before they are fully tested.

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds
Screenshot 2023-04-23 at 11 38 36

Copy link
Collaborator

@sirosen sirosen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been looking for a project to try out ruff, so putting it on nose2 would be interesting to me.

I want to give particular thanks for being diligent about ignoring things which could have changed semantics, especially on old pythons. It make reviewing this much easier!

There's the possibility of moving nose2's packaging configuration into pyproject.toml in the future to consider too.

Overall, a big 👍 for this. I look forward to seeing how it works out (and it can always be changed back in the future if necessary). Thanks!

@sirosen sirosen merged commit 203377e into nose-devs:main Apr 25, 2023
@cclauss cclauss deleted the ruff branch April 25, 2023 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub tests are failing on Python 3.12 alpha 7
2 participants