From ec42fde9b9125e9368088b6ed8e263b92b48465b Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Wed, 8 May 2024 11:52:22 +0200 Subject: [PATCH] Switch to using `ruff` for linting. --- .pre-commit-config.yaml | 42 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 17fd9a93..d8b01c1b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,28 +1,22 @@ repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.5.5 hooks: - - id: check-yaml - args: ['--unsafe'] - - id: check-json - - id: end-of-file-fixer - - id: trailing-whitespace - - id: no-commit-to-branch - - id: pretty-format-json - args: ['--autofix'] - -- repo: git@github.com:humitos/mirrors-autoflake.git - rev: v1.1 + - id: forbid-crlf + - id: remove-crlf + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 hooks: - - id: autoflake - args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] - -- repo: https://github.com/timothycrosley/isort - rev: 5.12.0 + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-merge-conflict + - id: check-toml + - id: check-yaml + exclude: helm/ + args: [ --unsafe ] + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: "v0.4.3" hooks: - - id: isort - -- repo: https://github.com/psf/black - rev: 23.10.0 - hooks: - - id: black + - id: ruff + args: [--fix, --exit-non-zero-on-fix] + - id: ruff-format