Skip to content

Commit

Permalink
Fix doc example
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Nov 23, 2024
1 parent 500bc0a commit dbe138b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/defaulthooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit dbe138b

Please sign in to comment.