From 3b4913ec810bcee60537380bdc721c04a4e823c6 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 17 Apr 2024 12:49:01 +0530 Subject: [PATCH 1/2] ci: dont auto apply fixes I've personally encountered ~5 instances of bad auto fixes, let developers apply the fixes. --- .pre-commit-config.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3cbbb7dfed..8436ef76def 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -59,8 +59,7 @@ repos: rev: v0.2.0 hooks: - id: ruff - name: "Run ruff linter and apply fixes" - args: ["--fix"] + name: "Run ruff linter" - id: ruff-format name: "Format Python code" From 85b1a8001b30429800ca5c6bef960c885368819b Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 21 May 2024 16:05:16 +0530 Subject: [PATCH 2/2] ci: ruff only fix imports --- .pre-commit-config.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8436ef76def..7375ca14727 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,12 +58,15 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.2.0 hooks: + - id: ruff + name: "Run ruff import sorter" + args: ["--select=I", "--fix"] + - id: ruff name: "Run ruff linter" - id: ruff-format - name: "Format Python code" - + name: "Run ruff formatter" ci: autoupdate_schedule: weekly