From 29d4b6c78ea9afd47ee5a385b38c543e435c32ed Mon Sep 17 00:00:00 2001 From: Martijn Pieters Date: Mon, 28 Mar 2022 19:17:20 +0100 Subject: [PATCH] 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 https://github.com/psf/black/issues/2964 --- .pre-commit-config.yaml | 5 ++++- CHANGES/701.misc.rst | 2 ++ tests/test_quoting.py | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 CHANGES/701.misc.rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 057e52ea7..82d906872 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,10 +12,13 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: '21.10b0' + rev: '22.1.0' hooks: - id: black language_version: python3 # Should be a command that runs python3.6+ + # Black misbehaved and broke when click 8.1.0 was released with an internal + # module removed. See https://github.com/psf/black/issues/2964 + additional_dependencies: ['click<8.1.0'] - repo: https://github.com/pre-commit/pre-commit-hooks rev: 'v4.0.1' hooks: diff --git a/CHANGES/701.misc.rst b/CHANGES/701.misc.rst new file mode 100644 index 000000000..e7ebfaf82 --- /dev/null +++ b/CHANGES/701.misc.rst @@ -0,0 +1,2 @@ +Updated the black .pre-commit-hook configuration to avoid it breaking due to +`Black issue #2964 `_. diff --git a/tests/test_quoting.py b/tests/test_quoting.py index 4975280f8..7ebc0f9b0 100644 --- a/tests/test_quoting.py +++ b/tests/test_quoting.py @@ -16,7 +16,6 @@ def quoter(request): def unquoter(request): return request.param - else: @pytest.fixture(params=[_PyQuoter], ids=["py_quoter"])