File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class Import:
16
16
17
17
18
18
@dataclass
19
- class ValidatorType :
19
+ class Type :
20
20
name : str
21
21
constraint : str
22
22
@@ -26,7 +26,7 @@ class Validator:
26
26
name : str
27
27
internal : bool
28
28
desc : str
29
- types : list [ValidatorType ]
29
+ types : list [Type ]
30
30
embed : Optional [str ]
31
31
aliased : Optional [str ]
32
32
@@ -54,16 +54,12 @@ def read(path: str) -> Data:
54
54
validators : list [Validator ] = []
55
55
56
56
for entry in data ["validators" ]:
57
- types : list [ValidatorType ] = []
57
+ types : list [Type ] = []
58
58
59
59
for type_ in entry ["types" ]:
60
- validator_type = ValidatorType (
61
- name = type_ ["name" ], constraint = type_ ["constraint" ]
62
- )
60
+ validator_type = Type (name = type_ ["name" ], constraint = type_ ["constraint" ])
63
61
64
- types .append (
65
- ValidatorType (name = type_ ["name" ], constraint = type_ ["constraint" ])
66
- )
62
+ types .append (validator_type )
67
63
68
64
if "." in validator_type .constraint :
69
65
pkg = validator_type .constraint .split ("." )[0 ]
You can’t perform that action at this time.
0 commit comments