Skip to content

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

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 5 commits into from
Jul 4, 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
8 changes: 4 additions & 4 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.4.10"
rev: "v0.5.0"
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -12,7 +12,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies: [black==24.1.1]
Expand All @@ -21,7 +21,7 @@ repos:
hooks:
- id: python-use-type-annotations
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.10.1
hooks:
- id: mypy
files: ^(src/|testing/|scripts/)
Expand All @@ -38,7 +38,7 @@ repos:
# on <3.11
- exceptiongroup>=1.0.0rc8
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.1.3"
rev: "2.1.4"
hooks:
- id: pyproject-fmt
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ disable = [
"method-hidden",
"missing-docstring",
"missing-timeout",
"misplaced-bare-raise", # PLE0704 from ruff
"multiple-statements", # multiple-statements-on-one-line-colon (E701) from ruff
"no-else-break",
"no-else-continue",
Expand Down Expand Up @@ -283,7 +284,8 @@ disable = [
"useless-import-alias",
"useless-return",
"using-constant-test",
"wrong-import-order",
"wrong-import-order", # handled by isort / ruff
"wrong-import-position", # handled by isort / ruff
]

[tool.check-wheel-contents]
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@
# The default behavior of logging is to print "Logging error"
# to stderr with the call stack and some extra details.
# pytest wants to make such mistakes visible during testing.
raise # pylint: disable=misplaced-bare-raise
raise # noqa: PLE0704

Check warning on line 402 in src/_pytest/logging.py

View check run for this annotation

Codecov / codecov/patch

src/_pytest/logging.py#L402

Added line #L402 was not covered by tests


@final
Expand Down
10 changes: 10 additions & 0 deletions testing/python/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ class B(A):
assert getfuncargnames(B.static, cls=B) == ("arg1", "arg2")


@pytest.mark.skipif(
sys.version_info >= (3, 13),
reason="""\
In python 3.13, this will raise FutureWarning:
functools.partial will be a method descriptor in future Python versions;
wrap it in staticmethod() if you want to preserve the old behavior

But the wrapped 'functools.partial' is tested by 'test_getfuncargnames_staticmethod_partial' below.
""",
)
def test_getfuncargnames_partial():
"""Check getfuncargnames for methods defined with functools.partial (#5701)"""
import functools
Expand Down
2 changes: 1 addition & 1 deletion testing/test_mark_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def mark_matcher() -> MarkMatcher:
markers = [
pytest.mark.number_mark(a=1, b=2, c=3, d=999_999).mark,
pytest.mark.builtin_matchers_mark(x=True, y=False, z=None).mark,
pytest.mark.str_mark(
pytest.mark.str_mark( # pylint: disable-next=non-ascii-name
m="M", space="with space", empty="", aaאבגדcc="aaאבגדcc", אבגד="אבגד"
).mark,
]
Expand Down
2 changes: 1 addition & 1 deletion testing/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ class TestClass(object):
)
def test_report_extra_parameters(reporttype: type[reports.BaseReport]) -> None:
args = list(inspect.signature(reporttype.__init__).parameters.keys())[1:]
basekw: dict[str, list[object]] = dict.fromkeys(args, [])
basekw: dict[str, list[object]] = {arg: [] for arg in args}
report = reporttype(newthing=1, **basekw)
assert report.newthing == 1

Expand Down
Loading