Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/jsonschema/_typing.py: 88%
8 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-08 06:51 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-08 06:51 +0000
1"""
2Some (initially private) typing helpers for jsonschema's types.
3"""
4from typing import Any, Callable, Iterable, Protocol, Tuple, Union
6import referencing.jsonschema
8from jsonschema.protocols import Validator
11class SchemaKeywordValidator(Protocol):
12 def __call__(
13 self,
14 validator: Validator,
15 value: Any,
16 instance: Any,
17 schema: referencing.jsonschema.Schema,
18 ) -> None:
19 ...
22id_of = Callable[[referencing.jsonschema.Schema], Union[str, None]]
25ApplicableValidators = Callable[
26 [referencing.jsonschema.Schema],
27 Iterable[Tuple[str, Any]],
28]