From 0b35eafd3ee540fa1539d077edc30861db12d7b5 Mon Sep 17 00:00:00 2001 From: andthum <56444687+andthum@users.noreply.github.com> Date: Fri, 13 May 2022 16:23:30 +0200 Subject: [PATCH] [.pre-commit-config.yaml]: Fix Black required-version The black pre-commit hook fails when using the `required-version` option (either as command line option or in a config file). This commit uses the fix proposed in https://github.com/psf/black/issues/2493#issuecomment-1081987650. --- .pre-commit-config.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4c442c..bd4eaff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -141,7 +141,10 @@ repos: - "colorama" - repo: "https://github.com/psf/black" - rev: "22.3.0" + # The `refs/tags/:refs/tags/` is needed for black's + # `required-version` option to work. See + # https://github.com/psf/black/issues/2493#issuecomment-1081987650 + rev: "refs/tags/22.3.0:refs/tags/22.3.0" hooks: # Format Python code with black. - id: "black"