From 982c23a261014befd1e793ca69f4f95a3316b48f Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sat, 14 Sep 2024 10:29:33 +0200 Subject: [PATCH] pre-commit: flake8 + black -> ruff --- .pre-commit-config.yaml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 72f098190..66cbb244c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,20 @@ ci: autoupdate_schedule: quarterly repos: -- repo: https://github.com/PyCQA/flake8 - rev: 7.1.0 +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.5.7 hooks: - - id: flake8 + - id: ruff + args: + - --fix + - --exit-non-zero-on-fix + - --ignore + - UP036 + exclude: | + (?x)^( + .cmake-format.py + )$ + - id: ruff-format exclude: | (?x)^( .cmake-format.py @@ -42,14 +52,6 @@ repos: - id: fix-byte-order-marker - id: mixed-line-ending - id: trailing-whitespace -- repo: https://github.com/psf/black - rev: 24.4.2 - hooks: - - id: black - exclude: | - (?x)^( - .cmake-format.py - )$ - repo: meta hooks: - id: check-hooks-apply