Skip to content

Commit

Permalink
Update to black 22.3.0 because of issue with click (#1780)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
aucampia committed Mar 30, 2022
1 parent 03c5e79 commit b7e2183
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
16 changes: 3 additions & 13 deletions .pre-commit-config.yaml
Expand Up @@ -14,21 +14,11 @@ repos:
pass_filenames: false
require_serial: true
args: ["."]
- repo: local
- repo: https://github.com/psf/black
# WARNING: version should be the same as in `pyproject.toml` and `requirements.dev.txt`.
rev: 'refs/tags/22.3.0:refs/tags/22.3.0'
hooks:
# using a local hook for black because of an issue that arises when using
# pre-commit and setuptools-scm that results in version info being lost.
# For more info see https://github.com/psf/black/issues/2493
# Based on https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
entry: black
language: python
# WARNING: version should be the same as in `pyproject.toml` and `requirements.dev.txt`.
additional_dependencies: ["black>=22.0,<23"]
# This is here to defer file selection to black which will do it based on
# black config.
pass_filenames: false
require_serial: true
args: ["."]
2 changes: 1 addition & 1 deletion docs/developers.rst
Expand Up @@ -10,7 +10,7 @@ This document describes the process and conventions to follow when
developing RDFLib code.

* Please be as Pythonic as possible (:pep:`8`).
* 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``.
* 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``.
* Code should also pass `flake8 <https://github.com/psf/black>`_ linting
and `mypy <http://mypy-lang.org/>`_ type checking.
* You must supply tests for new code.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
@@ -1,5 +1,5 @@
[tool.black]
required-version = "22.1.0"
required-version = "22.3.0"
line-length = "88"
skip-string-normalization = true
target-version = ['py37']
Expand Down
2 changes: 1 addition & 1 deletion requirements.dev.txt
@@ -1,4 +1,4 @@
black==22.1.0
black==22.3.0
coverage
doctest-ignore-unicode==0.1.2
flake8
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -31,7 +31,7 @@
"berkeleydb": ["berkeleydb"],
"networkx": ["networkx"],
"dev": [
"black==22.1.0",
"black==22.3.0",
"mypy",
"flake8",
"flake8-black",
Expand Down

0 comments on commit b7e2183

Please sign in to comment.