Skip to content

Commit 7b0e794

Browse files
authored
Pin black (RDFLib#2843)
* Ensure correct Black version and Poetry version in pre-commit ci file * Enforce the correct specific version of Black to be used * Add missing ruff operator command * Don't update Black using Dependabot, and don't update patch-level changes to `types-setuptools`
1 parent 6c5a783 commit 7b0e794

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.github/dependabot.yml

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ updates:
1111
versions:
1212
- 3.4.3
1313
- 3.5.2
14+
# Ignore all black updates, because we use a pinned version we don't want to change
15+
- dependency-name: black
16+
# Ignore types-setuptools patch-level updates, because they issue too many!
17+
- dependency-name: types-setuptools
18+
update-types: ["version-update:semver-patch"]
1419
- package-ecosystem: github-actions
1520
directory: "/"
1621
schedule:

.pre-commit-config.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@ ci:
77
# https://pre-commit.com/#adding-pre-commit-plugins-to-your-project
88
repos:
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10+
# WARNING: Ruff version should be the same as in `pyproject.toml`
1011
rev: v0.5.4
1112
hooks:
1213
- id: ruff
1314
args: ["--fix"]
1415
- repo: https://github.com/psf/black-pre-commit-mirror
15-
# WARNING: version should be the same as in `pyproject.toml`
16+
# WARNING: Black version should be the same as in `pyproject.toml`
1617
rev: "24.4.2"
1718
hooks:
1819
- id: black
1920
pass_filenames: false
2021
require_serial: true
2122
args: ["."]
2223
- repo: https://github.com/python-poetry/poetry
23-
rev: 1.8.0
24+
rev: 1.8.3
2425
hooks:
2526
- id: poetry-check
2627
- id: poetry-lock

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ ignore = [
163163
[tool.black]
164164
line-length = "88"
165165
target-version = ['py38']
166+
required-version = "24.4.2"
166167
include = '\.pyi?$'
167168
exclude = '''
168169
(

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ skip_install = true
4848
commands_pre =
4949
poetry install --no-root --only=lint
5050
commands =
51-
poetry run ruff .
51+
poetry run ruff check .
5252

5353

5454
[testenv:docs]

0 commit comments

Comments
 (0)