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

[pre-commit.ci] pre-commit autoupdate #13271

Merged
merged 3 commits into from
Mar 3, 2025
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.7"
rev: "v0.9.9"
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -12,7 +12,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.3.1
rev: v1.4.1
hooks:
- id: zizmor
- repo: https://github.com/adamchainz/blacken-docs
Expand Down Expand Up @@ -48,7 +48,7 @@ repos:
# on <3.11
- exceptiongroup>=1.0.0rc8
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.5.0"
rev: "v2.5.1"
hooks:
- id: pyproject-fmt
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/python_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ def validate_exc(exc: type[E]) -> type[E]:
raise TypeError(f"{func!r} object (type: {type(func)}) must be callable")
try:
func(*args[1:], **kwargs)
except expected_exceptions as e:
except expected_exceptions as e: # pylint: disable=catching-non-exception
return _pytest._code.ExceptionInfo.from_exception(e)
fail(message)

Expand Down
4 changes: 2 additions & 2 deletions testing/acceptance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,14 +999,14 @@ def test_calls_showall_durationsmin_verbose(
def check_tests_in_output(
lines: Sequence[str], *expected_test_numbers: int, number_of_tests: int = 3
) -> None:
found_test_numbers = set(
found_test_numbers = {
test_number
for test_number in range(1, number_of_tests + 1)
if any(
line.endswith(f"test_{test_number}") and " call " in line
for line in lines
)
)
}
assert found_test_numbers == set(expected_test_numbers)

def test_with_deselected(self, pytester: Pytester, mock_timing) -> None:
Expand Down