mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Update jsonschema stubs to track latest changes (#14591)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
version = "4.25.*"
|
||||
version = "~=4.25.1"
|
||||
upstream_repository = "https://github.com/python-jsonschema/jsonschema"
|
||||
requires = ["referencing"]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterator, Mapping, Sequence
|
||||
from typing import ClassVar, Protocol
|
||||
from typing import Any, ClassVar, Protocol
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
import referencing.jsonschema
|
||||
@@ -15,12 +15,14 @@ class Validator(Protocol):
|
||||
VALIDATORS: ClassVar[dict[Incomplete, Incomplete]]
|
||||
TYPE_CHECKER: ClassVar[TypeChecker]
|
||||
FORMAT_CHECKER: ClassVar[FormatChecker]
|
||||
schema: dict[Incomplete, Incomplete] | bool
|
||||
schema: referencing.jsonschema.Schema
|
||||
def __init__(
|
||||
self,
|
||||
schema: dict[Incomplete, Incomplete] | bool,
|
||||
registry: referencing.jsonschema.SchemaRegistry,
|
||||
schema: Mapping[Incomplete, Incomplete] | bool,
|
||||
resolver: Any = None, # deprecated
|
||||
format_checker: FormatChecker | None = None,
|
||||
*,
|
||||
registry: referencing.jsonschema.SchemaRegistry = ...,
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def check_schema(cls, schema: dict[Incomplete, Incomplete]) -> None: ...
|
||||
|
||||
@@ -21,7 +21,7 @@ _ValidatorCallback: TypeAlias = Callable[[Any, Any, _JsonValue, _JsonObject], It
|
||||
# This class does not exist at runtime. Compatible classes are created at
|
||||
# runtime by create().
|
||||
@type_check_only
|
||||
class _Validator:
|
||||
class _Validator(Validator):
|
||||
VALIDATORS: ClassVar[dict[Incomplete, Incomplete]]
|
||||
META_SCHEMA: ClassVar[dict[Incomplete, Incomplete]]
|
||||
TYPE_CHECKER: ClassVar[Incomplete]
|
||||
@@ -32,12 +32,11 @@ class _Validator:
|
||||
format_checker: FormatChecker | None
|
||||
def __init__(
|
||||
self,
|
||||
schema: Schema,
|
||||
resolver=None,
|
||||
schema: Mapping[Incomplete, Incomplete] | bool,
|
||||
resolver: Any = None, # deprecated
|
||||
format_checker: FormatChecker | None = None,
|
||||
*,
|
||||
registry: SchemaRegistry = ...,
|
||||
_resolver=None,
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def check_schema(cls, schema: Schema, format_checker: FormatChecker | Unset = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user