Skip to content

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

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

Merged
merged 2 commits into from
Sep 3, 2024
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 @@ -32,15 +32,15 @@ repos:

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

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

# Avoid directional quotes
- repo: https://github.com/sirosen/texthooks
rev: "0.6.6"
rev: "0.6.7"
hooks:
- id: fix-ligatures
- id: fix-smartquotes
Expand Down Expand Up @@ -142,14 +142,14 @@ repos:

# PyLint has native support - not always usable, but works for us
- repo: https://github.com/PyCQA/pylint
rev: "v3.2.6"
rev: "v3.2.7"
hooks:
- id: pylint
files: ^pybind11

# Check schemas on some of our YAML files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.1
rev: 0.29.2
hooks:
- id: check-readthedocs
- id: check-github-workflows
Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def stderr(self):
return Output(self.err)


@pytest.fixture()
@pytest.fixture
def capture(capsys):
"""Extended `capsys` with context manager and custom equality operators"""
return Capture(capsys)
Expand Down Expand Up @@ -172,7 +172,7 @@ def _sanitize_docstring(thing):
return _sanitize_general(s)


@pytest.fixture()
@pytest.fixture
def doc():
"""Sanitize docstrings and add custom failure explanation"""
return SanitizedString(_sanitize_docstring)
Expand All @@ -184,7 +184,7 @@ def _sanitize_message(thing):
return _hexadecimal.sub("0", s)


@pytest.fixture()
@pytest.fixture
def msg():
"""Sanitize messages and add custom failure explanation"""
return SanitizedString(_sanitize_message)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
pytest.skip("Can't run a new event_loop in pyodide", allow_module_level=True)


@pytest.fixture()
@pytest.fixture
def event_loop():
loop = asyncio.new_event_loop()
yield loop
Expand Down
2 changes: 1 addition & 1 deletion tests/test_custom_type_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pybind11_tests import custom_type_setup as m


@pytest.fixture()
@pytest.fixture
def gc_tester():
"""Tests that an object is garbage collected.

Expand Down
2 changes: 1 addition & 1 deletion tests/test_numpy_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_dtypes():
)


@pytest.fixture()
@pytest.fixture
def arr():
return np.array([[1, 2, 3], [4, 5, 6]], "=u2")

Expand Down