Skip to content

Commit 29d4b6c

Browse files
committed
Unbreak black
Move to the stable release and pin click, as black used the wrong exception to work around a click interaction causing issues. See psf/black#2964
1 parent 371fdeb commit 29d4b6c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ repos:
1212
hooks:
1313
- id: isort
1414
- repo: https://github.com/psf/black
15-
rev: '21.10b0'
15+
rev: '22.1.0'
1616
hooks:
1717
- id: black
1818
language_version: python3 # Should be a command that runs python3.6+
19+
# Black misbehaved and broke when click 8.1.0 was released with an internal
20+
# module removed. See https://github.com/psf/black/issues/2964
21+
additional_dependencies: ['click<8.1.0']
1922
- repo: https://github.com/pre-commit/pre-commit-hooks
2023
rev: 'v4.0.1'
2124
hooks:

CHANGES/701.misc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Updated the black .pre-commit-hook configuration to avoid it breaking due to
2+
`Black issue #2964 <https://github.com/psf/black/issues/2964>`_.

tests/test_quoting.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def quoter(request):
1616
def unquoter(request):
1717
return request.param
1818

19-
2019
else:
2120

2221
@pytest.fixture(params=[_PyQuoter], ids=["py_quoter"])

0 commit comments

Comments
 (0)