Skip to content

Commit

Permalink
Fix: black pre-commit mutable rev configuration
Browse files Browse the repository at this point in the history
pre-commit black current configuration uses stable for rev, what creates
warnings at pre-commit runtime as discussed at the following URL
psf/black#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 <guillaume.lambert@orange.com>
Change-Id: I577d22e56155212bbb708213efb8f09c0283dd64
  • Loading branch information
guillaumelambert committed May 28, 2021
1 parent c0ce4e5 commit cdfb4b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -20,7 +20,7 @@ repos:
stages: [commit]

- repo: https://github.com/ambv/black
rev: stable
rev: 21.5b1
hooks:
- id: black

Expand Down

0 comments on commit cdfb4b1

Please sign in to comment.