File tree Expand file tree Collapse file tree 1 file changed +15
-16
lines changed
pydantic_async_validation Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change 6
6
from pydantic_async_validation .constants import ASYNC_FIELD_VALIDATOR_CONFIG_KEY , ASYNC_MODEL_VALIDATOR_CONFIG_KEY
7
7
from pydantic_async_validation .utils import make_generic_validator , prepare_validator
8
8
9
-
10
- class Validator :
11
- """Helper / data class to store validator information."""
12
-
13
- __slots__ = ('func' , 'skip_on_failure' )
14
-
15
- def __init__ (
16
- self ,
17
- func : Callable ,
18
- skip_on_failure : bool = False ,
19
- ) -> None :
20
- self .func = func
21
- self .skip_on_failure = skip_on_failure
22
-
23
-
24
9
if TYPE_CHECKING :
25
10
from inspect import Signature # noqa
26
11
@@ -39,7 +24,21 @@ def __init__(
39
24
]
40
25
41
26
ValidatorsList = list [ValidatorCallable ]
42
- ValidatorListDict = dict [str , list [Validator ]]
27
+ ValidatorListDict = "dict[str, list[Validator]]"
28
+
29
+
30
+ class Validator :
31
+ """Helper / data class to store validator information."""
32
+
33
+ __slots__ = ('func' , 'skip_on_failure' )
34
+
35
+ def __init__ (
36
+ self ,
37
+ func : Callable ,
38
+ skip_on_failure : bool = False ,
39
+ ) -> None :
40
+ self .func = func
41
+ self .skip_on_failure = skip_on_failure
43
42
44
43
45
44
def async_field_validator (
You can’t perform that action at this time.
0 commit comments