From: Guillaume Lambert Date: Thu, 27 May 2021 20:28:51 +0000 (+0200) Subject: Fix: black pre-commit mutable rev configuration X-Git-Tag: v0.7.0~4 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=cdfb4b1348f7441255ff0c1a8667d4c0da005122;p=releng%2Fdocs-conf.git Fix: black pre-commit mutable rev configuration pre-commit black current configuration uses stable for rev, what creates warnings at pre-commit runtime as discussed at the following URL https://github.com/psf/black/issues/420 "pre-commit assumes that the value of rev is an immutable ref (such as a tag or SHA) and will cache based on that. Using a branch name (or HEAD) for the value of rev is not supported and will only represent the state of that mutable ref at the time of hook installation (and will NOT update automatically)" as stated in the official documentation at https://pre-commit.com/#using-the-latest-version-for-a-repository rev stable has been replaced here by 21.5b1 in the precommit yaml file to fix the warning and ensure CI and local pre-commit coherency. Signed-off-by: Guillaume Lambert Change-Id: I577d22e56155212bbb708213efb8f09c0283dd64 --- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dff752e..820563c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: stages: [commit] - repo: https://github.com/ambv/black - rev: stable + rev: 21.5b1 hooks: - id: black