-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
- Loading branch information
1 parent
49b717c
commit 6ca7505
Showing
6 changed files
with
48 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from collections.abc import Callable, Iterable | ||
from typing import Any, Protocol | ||
from typing_extensions import TypeAlias | ||
|
||
from jsonschema.protocols import Validator | ||
from referencing.jsonschema import Schema | ||
|
||
class SchemaKeywordValidator(Protocol): | ||
def __call__(self, validator: Validator, value: Any, instance: Any, schema: Schema) -> None: ... | ||
|
||
id_of: TypeAlias = Callable[[Schema], str | None] # noqa: Y042 | ||
|
||
ApplicableValidators: TypeAlias = Callable[[Schema], Iterable[tuple[str, Any]]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters