@@ -9,9 +9,9 @@ from ._utils import URIDict
9
9
from .exceptions import ValidationError
10
10
11
11
# these type aliases do not exist at runtime, they're only defined here in the stub
12
- _JSON_OBJECT : TypeAlias = Mapping [str , Any ]
13
- _JSON_VALUE : TypeAlias = _JSON_OBJECT | list [Any ] | str | int | float | bool | None
14
- _ValidatorCallback : TypeAlias = Callable [[Any , Any , _JSON_VALUE , _JSON_OBJECT ], Iterator [ValidationError ]]
12
+ _JsonObject : TypeAlias = Mapping [str , Any ]
13
+ _JsonValue : TypeAlias = _JsonObject | list [Any ] | str | int | float | bool | None
14
+ _ValidatorCallback : TypeAlias = Callable [[Any , Any , _JsonValue , _JsonObject ], Iterator [ValidationError ]]
15
15
16
16
_Schema : TypeAlias = Mapping [str , Any ]
17
17
@@ -41,13 +41,13 @@ class _Validator:
41
41
42
42
def validates (version : str ) -> Callable [..., Any ]: ...
43
43
def create (
44
- meta_schema : Mapping [ str , Any ] ,
44
+ meta_schema : _Schema ,
45
45
validators : Mapping [str , _ValidatorCallback ] | tuple [()] = ...,
46
46
version : Any | None = ...,
47
47
type_checker : TypeChecker = ...,
48
48
format_checker : FormatChecker = ...,
49
- id_of : Callable [[bool | _JSON_OBJECT ], str ] = ...,
50
- applicable_validators : Callable [[_JSON_OBJECT ], Iterable [tuple [str , _ValidatorCallback ]]] = ...,
49
+ id_of : Callable [[_Schema ], str ] = ...,
50
+ applicable_validators : Callable [[_Schema ], Iterable [tuple [str , _ValidatorCallback ]]] = ...,
51
51
) -> type [_Validator ]: ...
52
52
def extend (
53
53
validator , validators = ..., version : Any | None = ..., type_checker : Any | None = ..., format_checker : Any | None = ...
0 commit comments