Skip to content

Commit 4eee04b

Browse files
committed
validator_for returns the type, not an instance of Validator
1 parent 636dbf8 commit 4eee04b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jsonschema/validators.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,10 @@ def validate(instance, schema, cls=None, *args, **kwargs): # noqa: D417
13211321
raise error
13221322

13231323

1324-
def validator_for(schema, default=_UNSET) -> Validator:
1324+
def validator_for(
1325+
schema,
1326+
default: Validator | _utils.Unset = _UNSET,
1327+
) -> type[Validator]:
13251328
"""
13261329
Retrieve the validator class appropriate for validating the given schema.
13271330

0 commit comments

Comments
 (0)