summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2021-08-04 10:14:29 +0100
committerJulian Berman <Julian@GrayVines.com>2021-08-04 10:14:29 +0100
commit39697cda809169cf7031839bb0174b5d8136029e (patch)
treef630eb9cabe3c138d27d90f7ecfa62ab30855b6f
parent430172925f6ac08a071a700da5a1fe90661c4998 (diff)
downloadjsonschema-39697cda809169cf7031839bb0174b5d8136029e.tar.gz
Tidy the docstring slightly.
-rw-r--r--jsonschema/_legacy_validators.py7
-rw-r--r--jsonschema/validators.py5
2 files changed, 8 insertions, 4 deletions
diff --git a/jsonschema/_legacy_validators.py b/jsonschema/_legacy_validators.py
index 194c68f..7cb6df9 100644
--- a/jsonschema/_legacy_validators.py
+++ b/jsonschema/_legacy_validators.py
@@ -4,8 +4,11 @@ from jsonschema.exceptions import ValidationError
def ignore_ref_siblings(schema):
"""
- Returns a list of validators that should apply for the given schema
- Used for draft7 and earlier
+ Ignore siblings of ``$ref`` if it is present.
+
+ Otherwise, return all validators.
+
+ Suitable for use with `create`'s ``applicable_validators`` argument.
"""
ref = schema.get(u"$ref")
if ref is not None:
diff --git a/jsonschema/validators.py b/jsonschema/validators.py
index a1d4214..7a07415 100644
--- a/jsonschema/validators.py
+++ b/jsonschema/validators.py
@@ -128,8 +128,9 @@ def create(
applicable_validators (collections.abc.Callable):
- A function that returns a list of validators that should apply
- to a given schema
+ A function that given a schema, returns the list of applicable
+ validators (names and callables) which will be called on to
+ validate the instance.
Returns: