mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 05:54:02 +08:00
Bump jsonschema to 4.24.* (#14166)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
version = "4.23.*"
|
||||
version = "4.24.*"
|
||||
upstream_repository = "https://github.com/python-jsonschema/jsonschema"
|
||||
requires = ["referencing"]
|
||||
partial_stub = true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete, SupportsKeysAndGetItem
|
||||
from _typeshed import Incomplete, SupportsKeysAndGetItem, SupportsNext
|
||||
from collections.abc import Generator, Iterable, Iterator, Mapping, MutableMapping, Sized
|
||||
|
||||
class URIDict(MutableMapping[str, str]):
|
||||
@@ -24,3 +24,4 @@ def unbool(element, true=..., false=...): ...
|
||||
def uniq(container) -> bool: ...
|
||||
def find_evaluated_item_indexes_by_schema(validator, instance, schema) -> list[Incomplete]: ...
|
||||
def find_evaluated_property_keys_by_schema(validator, instance, schema) -> list[Incomplete]: ...
|
||||
def is_valid(errs_it: SupportsNext[object]) -> bool: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from _typeshed import Incomplete, SupportsKeysAndGetItem
|
||||
from collections.abc import Callable, Generator, Iterable, Iterator, Mapping
|
||||
from contextlib import contextmanager
|
||||
from typing import Any, ClassVar
|
||||
from typing_extensions import TypeAlias
|
||||
from typing import Any, ClassVar, overload
|
||||
from typing_extensions import TypeAlias, deprecated
|
||||
|
||||
from referencing.jsonschema import Schema, SchemaRegistry
|
||||
from referencing.typing import URI
|
||||
@@ -11,6 +11,7 @@ from ._format import FormatChecker
|
||||
from ._types import TypeChecker
|
||||
from ._utils import Unset, URIDict
|
||||
from .exceptions import ValidationError
|
||||
from .protocols import Validator
|
||||
|
||||
# these type aliases do not exist at runtime, they're only defined here in the stub
|
||||
_JsonObject: TypeAlias = Mapping[str, Any]
|
||||
@@ -40,15 +41,27 @@ class _Validator:
|
||||
@classmethod
|
||||
def check_schema(cls, schema: Schema, format_checker: FormatChecker | Unset = ...) -> None: ...
|
||||
@property
|
||||
@deprecated(
|
||||
"Accessing resolver() is deprecated as of v4.18.0, "
|
||||
"in favor of the https://github.com/python-jsonschema/referencing library."
|
||||
)
|
||||
def resolver(self): ...
|
||||
def evolve(self, **changes) -> _Validator: ...
|
||||
def iter_errors(self, instance, _schema: Schema | None = ...) -> Generator[Incomplete, None, None]: ...
|
||||
@overload
|
||||
def iter_errors(self, instance) -> Generator[Incomplete]: ...
|
||||
@overload
|
||||
@deprecated("Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release.")
|
||||
def iter_errors(self, instance, _schema: Schema | None) -> Generator[Incomplete]: ...
|
||||
def descend(
|
||||
self, instance, schema: Schema, path: Incomplete | None = ..., schema_path: Incomplete | None = ..., resolver=None
|
||||
) -> Generator[Incomplete, None, None]: ...
|
||||
def validate(self, *args, **kwargs) -> None: ...
|
||||
def is_type(self, instance, type): ...
|
||||
def is_valid(self, instance, _schema: Schema | None = ...) -> bool: ...
|
||||
def is_type(self, instance, type) -> bool: ...
|
||||
@overload
|
||||
def is_valid(self, instance) -> bool: ...
|
||||
@overload
|
||||
@deprecated("Passing a schema to Validator.is_valid is deprecated and will be removed in a future release.")
|
||||
def is_valid(self, instance, _schema: Schema | None) -> bool: ...
|
||||
|
||||
def validates(version: str) -> Callable[..., Incomplete]: ...
|
||||
def create(
|
||||
@@ -94,15 +107,16 @@ class RefResolver:
|
||||
@property
|
||||
def resolution_scope(self): ...
|
||||
@property
|
||||
def base_uri(self): ...
|
||||
def base_uri(self) -> str: ...
|
||||
@contextmanager
|
||||
@deprecated("jsonschema.RefResolver.in_scope is deprecated and will be removed in a future release.")
|
||||
def in_scope(self, scope) -> Generator[None]: ...
|
||||
@contextmanager
|
||||
def resolving(self, ref) -> Generator[Incomplete, None, None]: ...
|
||||
def resolve(self, ref): ...
|
||||
def resolve_from_url(self, url): ...
|
||||
def resolve_fragment(self, document, fragment): ...
|
||||
def resolve_remote(self, uri): ...
|
||||
def resolving(self, ref: str) -> Generator[Incomplete]: ...
|
||||
def resolve(self, ref: str) -> tuple[str, Incomplete]: ...
|
||||
def resolve_from_url(self, url: str): ...
|
||||
def resolve_fragment(self, document, fragment: str): ...
|
||||
def resolve_remote(self, uri: str): ...
|
||||
|
||||
def validate(instance: object, schema: Schema, cls: type[_Validator] | None = None, *args: Any, **kwargs: Any) -> None: ...
|
||||
def validator_for(schema: Schema | bool, default=...): ...
|
||||
def validator_for(schema: Schema | bool, default: type[Validator] | Unset = ...) -> type[Validator]: ...
|
||||
|
||||
Reference in New Issue
Block a user