From 71b481bcb9c368609bf37dbcdffcdb151383ca5e Mon Sep 17 00:00:00 2001 From: David Culley <6276049+davidculley@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:10:17 +0200 Subject: [PATCH 1/5] confine pre-commit to stages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index a1ff41fded8..54a03efe7a1 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -4,6 +4,7 @@ name: black description: "Black: The uncompromising Python code formatter" entry: black + stages: [pre-commit, pre-merge-commit, pre-push, manual] language: python minimum_pre_commit_version: 2.9.2 require_serial: true @@ -13,6 +14,7 @@ description: "Black: The uncompromising Python code formatter (with Jupyter Notebook support)" entry: black + stages: [pre-commit, pre-merge-commit, pre-push, manual] language: python minimum_pre_commit_version: 2.9.2 require_serial: true From 45ff447fe6db55d96e1c97e51849187cdc09712d Mon Sep 17 00:00:00 2001 From: David Culley <6276049+davidculley@users.noreply.github.com> Date: Wed, 18 Oct 2023 15:58:08 +0200 Subject: [PATCH 2/5] update CHANGES.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index a608551815f..5116ac0017e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -57,6 +57,7 @@ - The action output displayed in the job summary is now wrapped in Markdown (#3914) +- Black will now run only on git hooks appropriate for a code formatter (#3940) ### Documentation From bda0cb39ec74e07c491e55094a3a078cee5baf23 Mon Sep 17 00:00:00 2001 From: David Culley <6276049+davidculley@users.noreply.github.com> Date: Wed, 25 Oct 2023 18:34:49 +0200 Subject: [PATCH 3/5] remove unrelated change Co-authored-by: Jelle Zijlstra --- CHANGES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 42ae7369648..7f649563e27 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -42,7 +42,6 @@ -- The action output displayed in the job summary is now wrapped in Markdown (#3914) - Black will now run only on git hooks appropriate for a code formatter (#3940) ### Documentation From 974ae9738b3b441b0db8aeb911d1d2bfe4ec52a3 Mon Sep 17 00:00:00 2001 From: David Culley <6276049+davidculley@users.noreply.github.com> Date: Wed, 25 Oct 2023 18:37:08 +0200 Subject: [PATCH 4/5] clarify that black's pre-commit integration is meant Co-authored-by: Jelle Zijlstra --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 7f649563e27..5dfa5f3d364 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -42,7 +42,7 @@ -- Black will now run only on git hooks appropriate for a code formatter (#3940) +- Black's pre-commit integration will now run only on git hooks appropriate for a code formatter (#3940) ### Documentation From 9686ebd03a7cd5788eaa321008f8c978167b23a0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 16:37:54 +0000 Subject: [PATCH 5/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 5dfa5f3d364..599a13478c9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -42,7 +42,8 @@ -- Black's pre-commit integration will now run only on git hooks appropriate for a code formatter (#3940) +- Black's pre-commit integration will now run only on git hooks appropriate for a code + formatter (#3940) ### Documentation