Skip to content

Commit

Permalink
chore(python): Update types
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
  • Loading branch information
Stranger6667 committed May 1, 2024
1 parent e564888 commit 21df181
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bindings/python/python/jsonschema_rs/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
from typing import Any, TypeVar
from typing import Any, Callable, TypeVar
from collections.abc import Iterator

_SchemaT = TypeVar("_SchemaT", bool, dict[str, Any])
_FormatFunc = TypeVar("_FormatFunc", bound=Callable[[str], bool])

def is_valid(
schema: _SchemaT,
instance: Any,
draft: int | None = None,
with_meta_schemas: bool | None = None,
formats: dict[str, _FormatFunc] | None = None,
) -> bool:
pass

Expand All @@ -16,6 +18,7 @@ def validate(
instance: Any,
draft: int | None = None,
with_meta_schemas: bool | None = None,
formats: dict[str, _FormatFunc] | None = None,
) -> None:
pass

Expand All @@ -24,6 +27,7 @@ def iter_errors(
instance: Any,
draft: int | None = None,
with_meta_schemas: bool | None = None,
formats: dict[str, _FormatFunc] | None = None,
) -> Iterator[ValidationError]:
pass

Expand All @@ -33,6 +37,7 @@ class JSONSchema:
schema: _SchemaT,
draft: int | None = None,
with_meta_schemas: bool | None = None,
formats: dict[str, _FormatFunc] | None = None,
) -> None:
pass

Expand All @@ -42,6 +47,7 @@ class JSONSchema:
schema: str,
draft: int | None = None,
with_meta_schemas: bool | None = None,
formats: dict[str, _FormatFunc] | None = None,
) -> "JSONSchema":
pass

Expand Down

0 comments on commit 21df181

Please sign in to comment.