From 2ec1affc8ba1f48a6d7f95522b6f5d91d205727d Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Thu, 8 Jun 2017 22:11:14 +0200 Subject: Dedent examples in validate.rst to fix sphinx doctest --- docs/validate.rst | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/validate.rst b/docs/validate.rst index 83bb784..6d65263 100644 --- a/docs/validate.rst +++ b/docs/validate.rst @@ -87,9 +87,9 @@ classes should adhere to. :rtype: bool - >>> schema = {"maxItems" : 2} - >>> Draft3Validator(schema).is_valid([2, 3, 4]) - False + >>> schema = {"maxItems" : 2} + >>> Draft3Validator(schema).is_valid([2, 3, 4]) + False .. method:: iter_errors(instance) @@ -97,16 +97,16 @@ classes should adhere to. :rtype: an iterable of :exc:`ValidationError`\s - >>> schema = { - ... "type" : "array", - ... "items" : {"enum" : [1, 2, 3]}, - ... "maxItems" : 2, - ... } - >>> v = Draft3Validator(schema) - >>> for error in sorted(v.iter_errors([2, 3, 4]), key=str): - ... print(error.message) - 4 is not one of [1, 2, 3] - [2, 3, 4] is too long + >>> schema = { + ... "type" : "array", + ... "items" : {"enum" : [1, 2, 3]}, + ... "maxItems" : 2, + ... } + >>> v = Draft3Validator(schema) + >>> for error in sorted(v.iter_errors([2, 3, 4]), key=str): + ... print(error.message) + 4 is not one of [1, 2, 3] + [2, 3, 4] is too long .. method:: validate(instance) @@ -114,11 +114,11 @@ classes should adhere to. :raises: :exc:`ValidationError` if the instance is invalid - >>> schema = {"maxItems" : 2} - >>> Draft3Validator(schema).validate([2, 3, 4]) - Traceback (most recent call last): - ... - ValidationError: [2, 3, 4] is too long + >>> schema = {"maxItems" : 2} + >>> Draft3Validator(schema).validate([2, 3, 4]) + Traceback (most recent call last): + ... + ValidationError: [2, 3, 4] is too long All of the :ref:`versioned validators ` that -- cgit v1.2.1