diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31c02f8c..966b216c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: args: [--fix, lf] - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.11" + rev: "v0.1.13" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/jsonschema/_format.py b/jsonschema/_format.py index c2a5a0cd..e5f5bb7c 100644 --- a/jsonschema/_format.py +++ b/jsonschema/_format.py @@ -55,7 +55,7 @@ def __init__(self, formats: typing.Iterable[str] | None = None): def __repr__(self): return f"" - def checks( # noqa: D417 + def checks( self, format: str, raises: _RaisesType = (), ) -> typing.Callable[[_F], _F]: """ @@ -75,7 +75,7 @@ def checks( # noqa: D417 The exception object will be accessible as the `jsonschema.exceptions.ValidationError.cause` attribute of the resulting validation error. - """ # noqa: D214,D405 (charliermarsh/ruff#3547) + """ def _checks(func: _F) -> _F: self.checkers[format] = (func, raises)