Hello nurse

This commit is contained in:
deamonkai
2026-03-03 22:16:33 -06:00
parent 903f79cb79
commit 64f8acade6
793 changed files with 234502 additions and 15 deletions

View File

@@ -0,0 +1,29 @@
"""
Some (initially private) typing helpers for jsonschema's types.
"""
from collections.abc import Iterable
from typing import Any, Callable, Protocol, Union
import referencing.jsonschema
from jsonschema.protocols import Validator
class SchemaKeywordValidator(Protocol):
def __call__(
self,
validator: Validator,
value: Any,
instance: Any,
schema: referencing.jsonschema.Schema,
) -> None:
...
id_of = Callable[[referencing.jsonschema.Schema], Union[str, None]]
ApplicableValidators = Callable[
[referencing.jsonschema.Schema],
Iterable[tuple[str, Any]],
]