Skip to content

Commit

Permalink
[.pre-commit-config.yaml]: Fix Black required-version
Browse files Browse the repository at this point in the history
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
psf/black#2493 (comment).
  • Loading branch information
andthum committed May 13, 2022
1 parent a7c1162 commit 0b35eaf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ repos:
- "colorama"

- repo: "https://github.com/psf/black"
rev: "22.3.0"
# The `refs/tags/<tag>:refs/tags/<tag>` 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"
Expand Down

0 comments on commit 0b35eaf

Please sign in to comment.