From dbe138b5f94984e7e2e6aa99668d7ffac9909674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tin=20Tvrtkovi=C4=87?= Date: Sat, 23 Nov 2024 22:36:40 +0100 Subject: [PATCH] Fix doc example --- docs/defaulthooks.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/defaulthooks.md b/docs/defaulthooks.md index 3ae4f23c..4b3097d9 100644 --- a/docs/defaulthooks.md +++ b/docs/defaulthooks.md @@ -40,6 +40,7 @@ Any of these hooks can be overriden if pure validation is required instead. ... def validate(value, type) -> int: ... if not isinstance(value, type): ... raise ValueError(f'{value!r} not an instance of {type}') +... return value >>> c.structure("1", int) Traceback (most recent call last):