Skip to content

Commit a2eba50

Browse files
committed
chore: ♻️ Types and imports first
1 parent d0d0b89 commit a2eba50

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

pydantic_async_validation/validators.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@
66
from pydantic_async_validation.constants import ASYNC_FIELD_VALIDATOR_CONFIG_KEY, ASYNC_MODEL_VALIDATOR_CONFIG_KEY
77
from pydantic_async_validation.utils import make_generic_validator, prepare_validator
88

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-
249
if TYPE_CHECKING:
2510
from inspect import Signature # noqa
2611

@@ -39,7 +24,21 @@ def __init__(
3924
]
4025

4126
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
4342

4443

4544
def async_field_validator(

0 commit comments

Comments
 (0)