Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update pre-commit hooks #4838

Merged
merged 3 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ repos:

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

# Check static types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.4.1"
rev: "v1.5.1"
hooks:
- id: mypy
args: []
Expand Down Expand Up @@ -84,15 +84,15 @@ repos:

# Also code format the docs
- repo: https://github.com/asottile/blacken-docs
rev: "1.15.0"
rev: "1.16.0"
hooks:
- id: blacken-docs
additional_dependencies:
- black==23.3.0 # keep in sync with black hook

# Changes tabs to spaces
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: "v1.5.1"
rev: "v1.5.4"
hooks:
- id: remove-tabs

Expand Down Expand Up @@ -147,7 +147,7 @@ repos:

# PyLint has native support - not always usable, but works for us
- repo: https://github.com/PyCQA/pylint
rev: "v3.0.0a6"
rev: "v3.0.0a7"
hooks:
- id: pylint
files: ^pybind11
2 changes: 1 addition & 1 deletion docs/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def generate_dummy_code_boost(nclasses=10):

for codegen in [generate_dummy_code_pybind11, generate_dummy_code_boost]:
print("{")
for i in range(0, 10):
for i in range(10):
nclasses = 2**i
with open("test.cpp", "w") as f:
f.write(codegen(nclasses))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ line-length = 120
isort.known-first-party = ["env", "pybind11_cross_module_tests", "pybind11_tests"]

[tool.ruff.per-file-ignores]
"tests/**" = ["EM", "N"]
"tests/**" = ["EM", "N", "E721"]
"tests/test_call_policies.py" = ["PLC1901"]
6 changes: 3 additions & 3 deletions tests/test_stl_binders.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ def test_map_string_double_const():
def test_noncopyable_containers():
# std::vector
vnc = m.get_vnc(5)
for i in range(0, 5):
for i in range(5):
assert vnc[i].value == i + 1

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

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

i = 1
Expand Down Expand Up @@ -252,7 +252,7 @@ def test_noncopyable_containers():
# nested std::map<std::vector>
nvnc = m.get_nvnc(5)
for i in range(1, 6):
for j in range(0, 5):
for j in range(5):
assert nvnc[i][j].value == j + 1

# Note: maps do not have .values()
Expand Down
Loading