Skip to content

Commit

Permalink
Add typing to _Error.__init__
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord committed Dec 22, 2022
1 parent efa28c6 commit 7fd4d38
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions jsonschema/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import annotations

from collections import defaultdict, deque
from collections.abc import Iterable, Mapping
from pprint import pformat
from textwrap import dedent, indent
from typing import TYPE_CHECKING, Any, ClassVar
Expand Down Expand Up @@ -31,17 +32,17 @@ class _Error(Exception):
def __init__(
self,
message: str,
validator=_unset,
path=(),
cause=None,
validator: str | _utils.Unset = _unset,
path: Iterable[str | int] = (),
cause: Exception | None = None,
context=(),
validator_value=_unset,
instance=_unset,
schema=_unset,
schema_path=(),
parent=None,
type_checker=_unset,
):
instance: Any = _unset,
schema: Mapping[str, Any] | bool | _utils.Unset = _unset,
schema_path: Iterable[str | int] = (),
parent: _Error | None = None,
type_checker: _types.TypeChecker | _utils.Unset = _unset,
) -> None:
super(_Error, self).__init__(
message,
validator,
Expand Down

0 comments on commit 7fd4d38

Please sign in to comment.