Skip to content

Commit dc3ea89

Browse files
authored
Merge pull request #7932 from python-pillow/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 6b676f2 + 7867040 commit dc3ea89

3 files changed

Lines changed: 22 additions & 8 deletions

File tree

.pre-commit-config.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.2.0
3+
rev: v0.3.4
44
hooks:
55
- id: ruff
6-
args: [--fix, --exit-non-zero-on-fix]
6+
args: [--exit-non-zero-on-fix]
77

88
- repo: https://github.com/psf/black-pre-commit-mirror
9-
rev: 24.1.1
9+
rev: 24.3.0
1010
hooks:
1111
- id: black
1212

1313
- repo: https://github.com/PyCQA/bandit
14-
rev: 1.7.7
14+
rev: 1.7.8
1515
hooks:
1616
- id: bandit
1717
args: [--severity-level=high]
1818
files: ^src/
1919

2020
- repo: https://github.com/Lucas-C/pre-commit-hooks
21-
rev: v1.5.4
21+
rev: v1.5.5
2222
hooks:
2323
- id: remove-tabs
2424
exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$)
@@ -42,6 +42,13 @@ repos:
4242
- id: trailing-whitespace
4343
exclude: ^.github/.*TEMPLATE|^Tests/(fonts|images)/
4444

45+
- repo: https://github.com/python-jsonschema/check-jsonschema
46+
rev: 0.28.1
47+
hooks:
48+
- id: check-github-workflows
49+
- id: check-readthedocs
50+
- id: check-renovate
51+
4552
- repo: https://github.com/sphinx-contrib/sphinx-lint
4653
rev: v0.9.1
4754
hooks:
@@ -62,5 +69,10 @@ repos:
6269
hooks:
6370
- id: tox-ini-fmt
6471

72+
- repo: meta
73+
hooks:
74+
- id: check-hooks-apply
75+
- id: check-useless-excludes
76+
6577
ci:
6678
autoupdate_schedule: monthly

Tests/bench_cffi_access.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ def timer(func, label, *args) -> None:
3232
break
3333
endtime = time.time()
3434
print(
35-
"{}: completed {} iterations in {:.4f}s, {:.6f}s per iteration".format(
36-
label, x + 1, endtime - starttime, (endtime - starttime) / (x + 1.0)
37-
)
35+
f"{label}: completed {x + 1} iterations in {endtime - starttime:.4f}s, "
36+
f"{(endtime - starttime) / (x + 1.0):.6f}s per iteration"
3837
)
3938

4039

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable"
9696
test-command = "cd {project} && .github/workflows/wheels-test.sh"
9797
test-extras = "tests"
9898

99+
[tool.ruff]
100+
fix = true
101+
99102
[tool.ruff.lint]
100103
select = [
101104
"C4", # flake8-comprehensions

0 commit comments

Comments
 (0)