diff options
Diffstat (limited to 'jsonschema')
-rw-r--r-- | jsonschema/protocols.py | 3 | ||||
-rw-r--r-- | jsonschema/validators.py | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/jsonschema/protocols.py b/jsonschema/protocols.py index 2a8f00d..5f52166 100644 --- a/jsonschema/protocols.py +++ b/jsonschema/protocols.py @@ -29,6 +29,7 @@ else: # but use `jsonschema` for any types which will otherwise not be resolvable if TYPE_CHECKING: import jsonschema + import jsonschema.validators from jsonschema.exceptions import ValidationError @@ -107,7 +108,7 @@ class Validator(Protocol): def __init__( self, schema: Mapping | bool, - resolver: jsonschema.RefResolver | None = None, + resolver: jsonschema.validators.RefResolver | None = None, format_checker: jsonschema.FormatChecker | None = None, ) -> None: ... diff --git a/jsonschema/validators.py b/jsonschema/validators.py index 6ceb75f..a132244 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -1060,9 +1060,9 @@ def validate(instance, schema, cls=None, *args, **kwargs): ... ValidationError: [2, 3, 4] is too long - :func:`validate` will first verify that the provided schema is - itself valid, since not doing so can lead to less obvious error - messages and fail in less obvious or consistent ways. + :func:`~jsonschema.validators.validate` will first verify that the + provided schema is itself valid, since not doing so can lead to less + obvious error messages and fail in less obvious or consistent ways. If you know you have a valid schema already, especially if you intend to validate multiple instances with |