From df0e119d7b97811bde971e8516390a858c5a3d02 Mon Sep 17 00:00:00 2001 From: David Culley <6276049+davidculley@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:28:36 +0100 Subject: [PATCH] confine pre-commit to stages See https://pre-commit.com/#confining-hooks-to-run-at-certain-stages > If you are authoring a tool, it is usually a good idea to provide an appropriate `stages` property. For example a reasonable setting for a linter or code formatter would be `stages: [pre-commit, pre-merge-commit, pre-push, manual]`. --- .pre-commit-hooks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index bb79103e1..3c18e78c0 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,6 +1,7 @@ - id: isort name: isort entry: isort + stages: [commit, merge-commit, push, manual] require_serial: true language: python types_or: [cython, pyi, python]