Skip to content

Commit

Permalink
Try fixing more Sphinx refs which fail only on Ubuntu...
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Nov 29, 2022
1 parent cdf0c71 commit 7ebe161
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/validate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion jsonschema/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# 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

Expand Down Expand Up @@ -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:
...
Expand Down
6 changes: 3 additions & 3 deletions jsonschema/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7ebe161

Please sign in to comment.