Skip to content

Commit 467fe27

Browse files
chore(deps): update pre-commit hooks (#4838)
* chore(deps): update pre-commit hooks updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.281 → v0.0.287](astral-sh/ruff-pre-commit@v0.0.281...v0.0.287) - [github.com/pre-commit/mirrors-mypy: v1.4.1 → v1.5.1](pre-commit/mirrors-mypy@v1.4.1...v1.5.1) - [github.com/asottile/blacken-docs: 1.15.0 → 1.16.0](adamchainz/blacken-docs@1.15.0...1.16.0) - [github.com/Lucas-C/pre-commit-hooks: v1.5.1 → v1.5.4](Lucas-C/pre-commit-hooks@v1.5.1...v1.5.4) - [github.com/PyCQA/pylint: v3.0.0a6 → v3.0.0a7](pylint-dev/pylint@v3.0.0a6...v3.0.0a7) * style: pre-commit fixes * Update pyproject.toml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <[email protected]>
1 parent c9638a1 commit 467fe27

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ repos:
3838

3939
# Ruff, the Python auto-correcting linter written in Rust
4040
- repo: https://github.com/astral-sh/ruff-pre-commit
41-
rev: v0.0.281
41+
rev: v0.0.287
4242
hooks:
4343
- id: ruff
4444
args: ["--fix", "--show-fixes"]
4545

4646
# Check static types with mypy
4747
- repo: https://github.com/pre-commit/mirrors-mypy
48-
rev: "v1.4.1"
48+
rev: "v1.5.1"
4949
hooks:
5050
- id: mypy
5151
args: []
@@ -84,15 +84,15 @@ repos:
8484

8585
# Also code format the docs
8686
- repo: https://github.com/asottile/blacken-docs
87-
rev: "1.15.0"
87+
rev: "1.16.0"
8888
hooks:
8989
- id: blacken-docs
9090
additional_dependencies:
9191
- black==23.3.0 # keep in sync with black hook
9292

9393
# Changes tabs to spaces
9494
- repo: https://github.com/Lucas-C/pre-commit-hooks
95-
rev: "v1.5.1"
95+
rev: "v1.5.4"
9696
hooks:
9797
- id: remove-tabs
9898

@@ -147,7 +147,7 @@ repos:
147147

148148
# PyLint has native support - not always usable, but works for us
149149
- repo: https://github.com/PyCQA/pylint
150-
rev: "v3.0.0a6"
150+
rev: "v3.0.0a7"
151151
hooks:
152152
- id: pylint
153153
files: ^pybind11

docs/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def generate_dummy_code_boost(nclasses=10):
7070

7171
for codegen in [generate_dummy_code_pybind11, generate_dummy_code_boost]:
7272
print("{")
73-
for i in range(0, 10):
73+
for i in range(10):
7474
nclasses = 2**i
7575
with open("test.cpp", "w") as f:
7676
f.write(codegen(nclasses))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,5 @@ line-length = 120
9494
isort.known-first-party = ["env", "pybind11_cross_module_tests", "pybind11_tests"]
9595

9696
[tool.ruff.per-file-ignores]
97-
"tests/**" = ["EM", "N"]
97+
"tests/**" = ["EM", "N", "E721"]
9898
"tests/test_call_policies.py" = ["PLC1901"]

tests/test_stl_binders.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,15 @@ def test_map_string_double_const():
209209
def test_noncopyable_containers():
210210
# std::vector
211211
vnc = m.get_vnc(5)
212-
for i in range(0, 5):
212+
for i in range(5):
213213
assert vnc[i].value == i + 1
214214

215215
for i, j in enumerate(vnc, start=1):
216216
assert j.value == i
217217

218218
# std::deque
219219
dnc = m.get_dnc(5)
220-
for i in range(0, 5):
220+
for i in range(5):
221221
assert dnc[i].value == i + 1
222222

223223
i = 1
@@ -252,7 +252,7 @@ def test_noncopyable_containers():
252252
# nested std::map<std::vector>
253253
nvnc = m.get_nvnc(5)
254254
for i in range(1, 6):
255-
for j in range(0, 5):
255+
for j in range(5):
256256
assert nvnc[i][j].value == j + 1
257257

258258
# Note: maps do not have .values()

0 commit comments

Comments
 (0)