From 780f7eb33b2024650dcf08708a7a04670a2a5d15 Mon Sep 17 00:00:00 2001 From: Matthew Hughes Date: Thu, 10 Oct 2024 08:06:35 +0100 Subject: [PATCH] Update stage names for `pre-commit` `pre-commit` v4.0.0 added a warning to deprecated stage names[1] so update these names to avoid the warning. This also required updating the minimum `pre-commit` version to one that supports the new names See also[2] for a similar change and the docs[3]. [1] https://github.com/pre-commit/pre-commit/blob/cc4a52241565440ce200666799eef70626457488/CHANGELOG.md#400---2024-10-05 [2] https://github.com/pre-commit/pre-commit-hooks/commit/003dfa55c9eb05b08b33f60864363392958f4618 [3] https://pre-commit.com/#confining-hooks-to-run-at-certain-stages Fixes: https://github.com/PyCQA/isort/issues/2294 --- .pre-commit-hooks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 3c18e78c..4e76f567 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,9 +1,9 @@ - id: isort name: isort entry: isort - stages: [commit, merge-commit, push, manual] + stages: [pre-commit, pre-merge-commit, pre-push, manual] require_serial: true language: python types_or: [cython, pyi, python] args: ['--filter-files'] - minimum_pre_commit_version: '2.9.2' + minimum_pre_commit_version: '3.2.0'