Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_typing.py30 linesDownload Raw Back to jsonschema
1"""2Some (initially private) typing helpers for jsonschema's types.3"""4from collections.abc import Callable, Iterable5from typing import Any, Protocol6 7import referencing.jsonschema8 9from jsonschema.protocols import Validator10 11 12class SchemaKeywordValidator(Protocol):13    def __call__(14        self,15        validator: Validator,16        value: Any,17        instance: Any,18        schema: referencing.jsonschema.Schema,19    ) -> None:20        ...21 22 23id_of = Callable[[referencing.jsonschema.Schema], str | None]24 25 26ApplicableValidators = Callable[27    [referencing.jsonschema.Schema],28    Iterable[tuple[str, Any]],29]30 
codekingpro/portable-devtools · Team Ai