From 242d37a21119804b037fa6aab706e6cba91a94c6 Mon Sep 17 00:00:00 2001 From: serramatutu Date: Tue, 9 Jul 2024 11:50:19 +0200 Subject: [PATCH] chore: add `stage_fixed` to lefthook Lefthook was leaving files behind whenever there was any formatting or linting changes. This should fix it. --- .changes/unreleased/Chore-20240709-115016.yaml | 3 +++ lefthook.yaml | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 .changes/unreleased/Chore-20240709-115016.yaml diff --git a/.changes/unreleased/Chore-20240709-115016.yaml b/.changes/unreleased/Chore-20240709-115016.yaml new file mode 100644 index 0000000..cb099d0 --- /dev/null +++ b/.changes/unreleased/Chore-20240709-115016.yaml @@ -0,0 +1,3 @@ +kind: Chore +body: Add `stage_fix` to lefthook hooks +time: 2024-07-09T11:50:16.68638+02:00 diff --git a/lefthook.yaml b/lefthook.yaml index bf7201a..f8ca36e 100644 --- a/lefthook.yaml +++ b/lefthook.yaml @@ -2,8 +2,10 @@ pre-commit: commands: ruff-format: run: "hatch run dev:ruff format" + stage_fixed: true ruff-lint: run: "hatch run dev:ruff check --fix" + stage_fixed: true pyright: run: "hatch run dev:basedpyright"