Skip to content

Commit

Permalink
New ruff fixed some bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Jan 12, 2024
1 parent c7a37f2 commit 6b4441e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions jsonschema/_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, formats: typing.Iterable[str] | None = None):
def __repr__(self):
return f"<FormatChecker checkers={sorted(self.checkers)}>"

def checks( # noqa: D417
def checks(
self, format: str, raises: _RaisesType = (),
) -> typing.Callable[[_F], _F]:
"""
Expand All @@ -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)
Expand Down

0 comments on commit 6b4441e

Please sign in to comment.