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

feat(ci): add the ruff tool to the pre-commit checks #593

Draft
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

jenstroeger
Copy link
Owner

@jenstroeger jenstroeger commented Aug 2, 2023

We have talked about ruff before, so this adds an initial setup to play around with. See also #5 (comment).

Even though ruff is supposed to be a drop-in replacement for Flake8 it doesn’t currently support all of the Flake8 plugins we use in this template. I guess for now we therefore keep flake8 around. The current ruff configuration is derived from the current .flake8 file, but we could consider expanding it.

@jenstroeger jenstroeger force-pushed the add-ruff branch 2 times, most recently from fcda704 to 3a52f2b Compare August 2, 2023 21:27
@behnazh
Copy link
Collaborator

behnazh commented Sep 2, 2023

What are the additional checks that ruff offers, which would otherwise be missed by our checks?

@copdips
Copy link

copdips commented Nov 25, 2023

ruff could replace almost all the python linters for now, only thing that it can not do for the moment as per my experience, is the typing check, so we could combine ruff with mypy or pyright.

@jenstroeger
Copy link
Owner Author

I agree @copdips, and thank you for the comment!

The list of rules that ruff implements (based on a multitude of pylint and flake8 plugins) is huge, and if you want please feel free to contribute settings which at least meet the current settings of this repository, maybe even improve it. The important thing we’d like to avoid by adding ruff is to regress because we’ve dropped a few checks…

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.

3 participants