Skip to content

Commit e19ad1f

Browse files
Merge pull request #12558 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents ac41898 + 92ec5c3 commit e19ad1f

File tree

6 files changed

+20
-8
lines changed

6 files changed

+20
-8
lines changed

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: "v0.4.10"
3+
rev: "v0.5.0"
44
hooks:
55
- id: ruff
66
args: ["--fix"]
@@ -12,7 +12,7 @@ repos:
1212
- id: end-of-file-fixer
1313
- id: check-yaml
1414
- repo: https://github.com/adamchainz/blacken-docs
15-
rev: 1.16.0
15+
rev: 1.18.0
1616
hooks:
1717
- id: blacken-docs
1818
additional_dependencies: [black==24.1.1]
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: python-use-type-annotations
2323
- repo: https://github.com/pre-commit/mirrors-mypy
24-
rev: v1.10.0
24+
rev: v1.10.1
2525
hooks:
2626
- id: mypy
2727
files: ^(src/|testing/|scripts/)
@@ -38,7 +38,7 @@ repos:
3838
# on <3.11
3939
- exceptiongroup>=1.0.0rc8
4040
- repo: https://github.com/tox-dev/pyproject-fmt
41-
rev: "2.1.3"
41+
rev: "2.1.4"
4242
hooks:
4343
- id: pyproject-fmt
4444
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version

pyproject.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ disable = [
221221
"method-hidden",
222222
"missing-docstring",
223223
"missing-timeout",
224+
"misplaced-bare-raise", # PLE0704 from ruff
224225
"multiple-statements", # multiple-statements-on-one-line-colon (E701) from ruff
225226
"no-else-break",
226227
"no-else-continue",
@@ -283,7 +284,8 @@ disable = [
283284
"useless-import-alias",
284285
"useless-return",
285286
"using-constant-test",
286-
"wrong-import-order",
287+
"wrong-import-order", # handled by isort / ruff
288+
"wrong-import-position", # handled by isort / ruff
287289
]
288290

289291
[tool.check-wheel-contents]

src/_pytest/logging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def handleError(self, record: logging.LogRecord) -> None:
399399
# The default behavior of logging is to print "Logging error"
400400
# to stderr with the call stack and some extra details.
401401
# pytest wants to make such mistakes visible during testing.
402-
raise # pylint: disable=misplaced-bare-raise
402+
raise # noqa: PLE0704
403403

404404

405405
@final

testing/python/fixtures.py

+10
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ class B(A):
7676
assert getfuncargnames(B.static, cls=B) == ("arg1", "arg2")
7777

7878

79+
@pytest.mark.skipif(
80+
sys.version_info >= (3, 13),
81+
reason="""\
82+
In python 3.13, this will raise FutureWarning:
83+
functools.partial will be a method descriptor in future Python versions;
84+
wrap it in staticmethod() if you want to preserve the old behavior
85+
86+
But the wrapped 'functools.partial' is tested by 'test_getfuncargnames_staticmethod_partial' below.
87+
""",
88+
)
7989
def test_getfuncargnames_partial():
8090
"""Check getfuncargnames for methods defined with functools.partial (#5701)"""
8191
import functools

testing/test_mark_expression.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def mark_matcher() -> MarkMatcher:
243243
markers = [
244244
pytest.mark.number_mark(a=1, b=2, c=3, d=999_999).mark,
245245
pytest.mark.builtin_matchers_mark(x=True, y=False, z=None).mark,
246-
pytest.mark.str_mark(
246+
pytest.mark.str_mark( # pylint: disable-next=non-ascii-name
247247
m="M", space="with space", empty="", aaאבגדcc="aaאבגדcc", אבגד="אבגד"
248248
).mark,
249249
]

testing/test_runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ class TestClass(object):
533533
)
534534
def test_report_extra_parameters(reporttype: type[reports.BaseReport]) -> None:
535535
args = list(inspect.signature(reporttype.__init__).parameters.keys())[1:]
536-
basekw: dict[str, list[object]] = dict.fromkeys(args, [])
536+
basekw: dict[str, list[object]] = {arg: [] for arg in args}
537537
report = reporttype(newthing=1, **basekw)
538538
assert report.newthing == 1
539539

0 commit comments

Comments
 (0)