Skip to content

Commit 7ebe161

Browse files
committed
Try fixing more Sphinx refs which fail only on Ubuntu...
1 parent cdf0c71 commit 7ebe161

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

docs/validate.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The Basics
1616
----------
1717

1818
The simplest way to validate an instance under a given schema is to use the
19-
:func:`validate` function.
19+
`validate <jsonschema.validators.validate>` function.
2020

2121
.. autofunction:: validate
2222
:noindex:

jsonschema/protocols.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
# but use `jsonschema` for any types which will otherwise not be resolvable
3030
if TYPE_CHECKING:
3131
import jsonschema
32+
import jsonschema.validators
3233

3334
from jsonschema.exceptions import ValidationError
3435

@@ -107,7 +108,7 @@ class Validator(Protocol):
107108
def __init__(
108109
self,
109110
schema: Mapping | bool,
110-
resolver: jsonschema.RefResolver | None = None,
111+
resolver: jsonschema.validators.RefResolver | None = None,
111112
format_checker: jsonschema.FormatChecker | None = None,
112113
) -> None:
113114
...

jsonschema/validators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,9 +1060,9 @@ def validate(instance, schema, cls=None, *args, **kwargs):
10601060
...
10611061
ValidationError: [2, 3, 4] is too long
10621062
1063-
:func:`validate` will first verify that the provided schema is
1064-
itself valid, since not doing so can lead to less obvious error
1065-
messages and fail in less obvious or consistent ways.
1063+
:func:`~jsonschema.validators.validate` will first verify that the
1064+
provided schema is itself valid, since not doing so can lead to less
1065+
obvious error messages and fail in less obvious or consistent ways.
10661066
10671067
If you know you have a valid schema already, especially
10681068
if you intend to validate multiple instances with

0 commit comments

Comments
 (0)