Skip to content

Commit b7eaf64

Browse files
committed
Update to black 22.3.0 because of issue with click
See this psf/black#2966 Also simplified pre-commit config of black based on a suggestion from https://github.com/jack1142 in psf/black#2493 (comment)
1 parent 03c5e79 commit b7eaf64

File tree

5 files changed

+7
-17
lines changed

5 files changed

+7
-17
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,11 @@ repos:
1414
pass_filenames: false
1515
require_serial: true
1616
args: ["."]
17-
- repo: local
17+
- repo: https://github.com/psf/black
18+
# WARNING: version should be the same as in `pyproject.toml` and `requirements.dev.txt`.
19+
rev: 'refs/tags/22.3.0:refs/tags/22.3.0'
1820
hooks:
19-
# using a local hook for black because of an issue that arises when using
20-
# pre-commit and setuptools-scm that results in version info being lost.
21-
# For more info see https://github.com/psf/black/issues/2493
22-
# Based on https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml
2321
- id: black
24-
name: black
25-
description: "Black: The uncompromising Python code formatter"
26-
entry: black
27-
language: python
28-
# WARNING: version should be the same as in `pyproject.toml` and `requirements.dev.txt`.
29-
additional_dependencies: ["black>=22.0,<23"]
30-
# This is here to defer file selection to black which will do it based on
31-
# black config.
3222
pass_filenames: false
3323
require_serial: true
3424
args: ["."]

docs/developers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This document describes the process and conventions to follow when
1010
developing RDFLib code.
1111

1212
* Please be as Pythonic as possible (:pep:`8`).
13-
* Code should be formatted using `black <https://github.com/psf/black>`_ and we use Black v22.1.0, with the black config in ``pyproject.toml``.
13+
* Code should be formatted using `black <https://github.com/psf/black>`_ and we use Black v22.3.0, with the black config in ``pyproject.toml``.
1414
* Code should also pass `flake8 <https://github.com/psf/black>`_ linting
1515
and `mypy <http://mypy-lang.org/>`_ type checking.
1616
* You must supply tests for new code.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.black]
2-
required-version = "22.1.0"
2+
required-version = "22.3.0"
33
line-length = "88"
44
skip-string-normalization = true
55
target-version = ['py37']

requirements.dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
black==22.1.0
1+
black==22.3.0
22
coverage
33
doctest-ignore-unicode==0.1.2
44
flake8

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"berkeleydb": ["berkeleydb"],
3232
"networkx": ["networkx"],
3333
"dev": [
34-
"black==22.1.0",
34+
"black==22.3.0",
3535
"mypy",
3636
"flake8",
3737
"flake8-black",

0 commit comments

Comments
 (0)