diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8b519965c..7d1660375 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ ci: autoupdate_schedule: monthly repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.20 + rev: v0.16.1 hooks: - id: ruff-check - id: ruff-format @@ -12,7 +12,7 @@ repos: - id: check-github-workflows - id: check-readthedocs - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.26.1 + rev: v1.29.0 hooks: - id: zizmor # TODO: Remove blacken-docs when https://github.com/astral-sh/ruff/issues/8237 is implemented @@ -22,6 +22,6 @@ repos: - id: blacken-docs additional_dependencies: [black==25.1.0] - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.11.26 + rev: 0.12.1 hooks: - id: uv-lock diff --git a/pyproject.toml b/pyproject.toml index d204caba6..14e764e0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,6 +87,7 @@ ignore = [ "ARG", # unused arguments are common w/ interfaces "COM", # let formatter take care commas "C901", # don't enforce complexity level + "CPY001", # don't require copyright notice at top of file "D", # don't require docstrings "DTZ007", # ignore false positives due to https://github.com/astral-sh/ruff/issues/1306 "E501", # leave line-length enforcement to formatter @@ -128,6 +129,9 @@ ignore = [ "S", # allow asserts "T", # allow prints ] +"performance/benchmark.py" = [ + "PLR0917", # allow many positional arguments +] "src/marshmallow/orderedset.py" = [ "FBT002", # allow boolean positional argument "T", # allow prints diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index 841043172..c6e71f706 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -347,7 +347,7 @@ def deserialize( attr: str | None = None, data: typing.Mapping[str, typing.Any] | None = None, **kwargs, - ) -> None | _InternalT: ... + ) -> _InternalT | None: ... # If value is not None, internal type is returned @typing.overload