From e25872b287aa5acabf2648407fb965b7b7877502 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 19 Dec 2024 12:24:01 -0300 Subject: [PATCH] ci: Update pre-commit configuration to use ruff for linting and formatting (#5360) chore: update pre-commit configuration to use ruff for linting and formatting --- .pre-commit-config.yaml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 42b3ae39b..7eafd54eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,15 +11,13 @@ repos: args: - --fix=lf - id: trailing-whitespace - - repo: local + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.8.3 hooks: - - id: ruff-check + - id: ruff name: ruff check - language: system - entry: bash -c "uv run ruff check" - types: [file, python] + types_or: [python, pyi] + args: [--fix] - id: ruff-format - name: ruff format - language: system - entry: bash -c "uv run ruff format" - types: [file, python] + types_or: [python, pyi] + args: [--config pyproject.toml]