feat: introduce the Ruff pre-commit hook to replace a bunch of other code formatters and linter hooks#593
feat: introduce the Ruff pre-commit hook to replace a bunch of other code formatters and linter hooks#593jenstroeger wants to merge 2 commits into
Conversation
fcda704 to
3a52f2b
Compare
|
What are the additional checks that |
|
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. |
|
I agree @copdips, and thank you for the comment! The list of rules that |
|
Interestingly, git 2.54.0 improved its hooks (docs) so perhaps using ruff and with some massaging we can get rid of pre-commit entirely… 🤔 |
|
@behnazh I updated this PR with the latest version of |
…code formatters and linter hooks
We have talked about
ruffbefore, so this adds an initial setup to play around with. See also #5 (comment).Even though
ruffis 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 keepflake8around. The currentruffconfiguration is derived from the current .flake8 file, but we could consider expanding it.