diff options
author | Julian Berman <Julian@GrayVines.com> | 2022-11-29 11:42:21 -0500 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2022-11-29 12:17:52 -0500 |
commit | 7ebe1614ce0d30e43e34e7543550a6a7420b508f (patch) | |
tree | 27b3dbc15597d16c314ff6fb076e0412f29c7a9d | |
parent | cdf0c71bcc07966ff131bfca83a3131c7e41f202 (diff) | |
download | jsonschema-4.17.2.tar.gz |
Try fixing more Sphinx refs which fail only on Ubuntu...v4.17.2
-rw-r--r-- | docs/validate.rst | 2 | ||||
-rw-r--r-- | jsonschema/protocols.py | 3 | ||||
-rw-r--r-- | jsonschema/validators.py | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/docs/validate.rst b/docs/validate.rst index 3d04a9a..c3b51dd 100644 --- a/docs/validate.rst +++ b/docs/validate.rst @@ -16,7 +16,7 @@ The Basics ---------- The simplest way to validate an instance under a given schema is to use the -:func:`validate` function. +`validate <jsonschema.validators.validate>` function. .. autofunction:: validate :noindex: 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 |