Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Investigate switching our Python code quality tooling to Ruff #423

Open
ian-noaa opened this issue Oct 23, 2023 · 1 comment
Open

Investigate switching our Python code quality tooling to Ruff #423

ian-noaa opened this issue Oct 23, 2023 · 1 comment

Comments

@ian-noaa
Copy link
Collaborator

ian-noaa commented Oct 23, 2023

Describe the motivation for the change

Ruff is a single replacement for the large number of python code quality tools out there. It's quite fast, implements a large number of checks, can be told to automatically --fix some issues, and has been gaining acceptance within the wider Python community. Notable Python projects using Ruff include Poetry, mypy, and pip.

It seems like a good way to reduce the number of tool config files we have to keep around, as well as to make it easier to try out and adopt new Python linting rule sets.

Describe the change

To switch to Ruff, we would remove flake8 & isort from our pyproject.toml dev dependency group and their config files from the repo. We'd then install Ruff, add the isort flag (select = ["I"]), and our current flake8 ignore(s) to the default Ruff config. We'd also need to update the GitHub workflow and the pre-commit config to call Ruff instead of flake8 & isort.

@esheehan-gsl
Copy link
Contributor

Aside from reducing the number of dependencies in the project, I think Ruff is also worth considering because it claims to be about 12s faster than flake8, which could be a boon for CI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants