Skip to content

Commit 3c0d493

Browse files
author
Sylvain MARIE
committed
Major doc update. Updates a few tests accordingly
1 parent ba6576b commit 3c0d493

14 files changed

Lines changed: 523 additions & 323 deletions

docs/api_reference.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# API reference
2+
3+
In general, `help(symbol)` will provide the latest up-to-date documentation.
4+
5+
## 1. inline
6+
7+
### `validate`
8+
9+
**todo**
10+
11+
### `validator` / `validation`
12+
13+
**todo**
14+
15+
## 2. functions
16+
17+
### `@validate_arg`
18+
19+
**todo**
20+
21+
### `@validate_out`
22+
23+
**todo**
24+
25+
### `@validate_io`
26+
27+
**todo**
28+
29+
## 3. classes
30+
31+
### `@validate_field`
32+
33+
**todo**
34+
35+
36+
## 4. internals
37+
38+
### `Validator`
39+
40+
**todo**
41+
42+
### `assert_valid`
43+
44+
**todo**
45+
46+
### `is_valid`
47+
48+
**todo**

docs/decorators/composition.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

docs/examples/example4.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,11 @@ def is_valid_tuple(t):
149149
# (c) the second element is a lowercase string of size 3
150150
instance_of(t[1], str)
151151
if len(t[1]) != 3: raise WrongLength(t[1], ref_length=3)
152-
# -- finally you can write custom Failure types
152+
ValidationFailurelure types
153153
if not t[1].islower():
154154
raise NotLowerCase(t[1])
155155

156-
class NotLowerCase(Failure, ValueError):
157-
""" Example custom exception class used in custom validation function. `Failure` base class provides some
158-
mechanisms to easily build the help message (same mechanisms than ValidationError)"""
156+
class NotLowerCase(ValidationFailurValidationFailurenisms than ValidationError)"""
159157
help_msg = "Value is not a lowercase string: {wrong_value}"
160158
```
161159

0 commit comments

Comments
 (0)