Update jsonschema stubs to track latest changes (#14591)

This commit is contained in:
Stephen Rosen
2025-08-20 10:16:24 -05:00
committed by GitHub
parent b9d15678cd
commit 2b271044dd
3 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
version = "4.25.*"
version = "~=4.25.1"
upstream_repository = "https://github.com/python-jsonschema/jsonschema"
requires = ["referencing"]
+6 -4
View File
@@ -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: ...
+3 -4
View File
@@ -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: ...