diff options
-rw-r--r-- | jsonschema/_format.py | 5 | ||||
-rw-r--r-- | jsonschema/_types.py | 3 | ||||
-rw-r--r-- | jsonschema/protocols.py | 6 | ||||
-rw-r--r-- | jsonschema/validators.py | 10 |
4 files changed, 14 insertions, 10 deletions
diff --git a/jsonschema/_format.py b/jsonschema/_format.py index f687b74..e9d91b6 100644 --- a/jsonschema/_format.py +++ b/jsonschema/_format.py @@ -105,10 +105,11 @@ class FormatChecker: The format that instance should conform to - Raises: - FormatError: if the instance does not conform to ``format`` + FormatError: + + if the instance does not conform to ``format`` """ if format not in self.checkers: diff --git a/jsonschema/_types.py b/jsonschema/_types.py index e858290..20ca418 100644 --- a/jsonschema/_types.py +++ b/jsonschema/_types.py @@ -112,7 +112,8 @@ class TypeChecker: Raises: `jsonschema.exceptions.UndefinedTypeCheck`: - if type is unknown to this object. + + if ``type`` is unknown to this object. """ try: fn = self._type_checkers[type] diff --git a/jsonschema/protocols.py b/jsonschema/protocols.py index 289cfa8..ac7b7b7 100644 --- a/jsonschema/protocols.py +++ b/jsonschema/protocols.py @@ -111,7 +111,7 @@ class Validator(Protocol): Raises: - `jsonschema.exceptions.SchemaError` + `jsonschema.exceptions.SchemaError`: if the schema is invalid """ @@ -136,7 +136,7 @@ class Validator(Protocol): Raises: - `jsonschema.exceptions.UnknownType` + `jsonschema.exceptions.UnknownType`: if ``type`` is not a known type """ @@ -176,7 +176,7 @@ class Validator(Protocol): Raises: - `jsonschema.exceptions.ValidationError` + `jsonschema.exceptions.ValidationError`: if the instance is invalid diff --git a/jsonschema/validators.py b/jsonschema/validators.py index 39e2990..718c4bd 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -1076,11 +1076,13 @@ def validate(instance, schema, cls=None, *args, **kwargs): Raises: - `jsonschema.exceptions.ValidationError` if the instance - is invalid + `jsonschema.exceptions.ValidationError`: - `jsonschema.exceptions.SchemaError` if the schema itself - is invalid + if the instance is invalid + + `jsonschema.exceptions.SchemaError`: + + if the schema itself is invalid .. rubric:: Footnotes .. [#] known by a validator registered with |