Skip to content

Commit 817eff4

Browse files
committed
Apply feedback per review
1 parent 989bd8b commit 817eff4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stubs/jsonschema/jsonschema/validators.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ from ._utils import URIDict
99
from .exceptions import ValidationError
1010

1111
# 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]]
1515

1616
_Schema: TypeAlias = Mapping[str, Any]
1717

@@ -41,13 +41,13 @@ class _Validator:
4141

4242
def validates(version: str) -> Callable[..., Any]: ...
4343
def create(
44-
meta_schema: Mapping[str, Any],
44+
meta_schema: _Schema,
4545
validators: Mapping[str, _ValidatorCallback] | tuple[()] = ...,
4646
version: Any | None = ...,
4747
type_checker: TypeChecker = ...,
4848
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]]] = ...,
5151
) -> type[_Validator]: ...
5252
def extend(
5353
validator, validators=..., version: Any | None = ..., type_checker: Any | None = ..., format_checker: Any | None = ...

0 commit comments

Comments
 (0)