1717from pydantic import (
1818 AliasChoices ,
1919 Field ,
20- Json ,
2120 NonNegativeFloat ,
2221 NonNegativeInt ,
2322 PositiveInt ,
@@ -79,13 +78,13 @@ class ClustersKeeperSSMSettings(SSMSettings):
7978
8079class WorkersEC2InstancesSettings (BaseCustomSettings ):
8180 WORKERS_EC2_INSTANCES_ALLOWED_TYPES : Annotated [
82- Json [ dict [str , EC2InstanceBootSpecific ] ],
81+ dict [str , EC2InstanceBootSpecific ],
8382 Field (
8483 description = "Defines which EC2 instances are considered as candidates for new EC2 instance and their respective boot specific parameters" ,
8584 ),
8685 ]
8786 WORKERS_EC2_INSTANCES_COLD_START_DOCKER_IMAGES_PRE_PULLING : Annotated [
88- Json [ list [DockerGenericTag ] ],
87+ list [DockerGenericTag ],
8988 Field (
9089 description = "List of docker images to pre-pull on cold started new EC2 instances" ,
9190 default_factory = list ,
@@ -119,7 +118,7 @@ class WorkersEC2InstancesSettings(BaseCustomSettings):
119118 ] = 10
120119 # NAME PREFIX is not exposed since we override it anyway
121120 WORKERS_EC2_INSTANCES_SECURITY_GROUP_IDS : Annotated [
122- Json [ list [str ] ],
121+ list [str ],
123122 Field (
124123 min_length = 1 ,
125124 description = "A security group acts as a virtual firewall for your EC2 instances to control incoming and outgoing traffic"
@@ -128,7 +127,7 @@ class WorkersEC2InstancesSettings(BaseCustomSettings):
128127 ),
129128 ]
130129 WORKERS_EC2_INSTANCES_SUBNET_IDS : Annotated [
131- Json [ list [str ] ],
130+ list [str ],
132131 Field (
133132 min_length = 1 ,
134133 description = "A subnet is a range of IP addresses in your VPC "
@@ -154,7 +153,7 @@ class WorkersEC2InstancesSettings(BaseCustomSettings):
154153 ] = datetime .timedelta (minutes = 3 )
155154
156155 WORKERS_EC2_INSTANCES_CUSTOM_TAGS : Annotated [
157- Json [ EC2Tags ] ,
156+ EC2Tags ,
158157 Field (
159158 description = "Allows to define tags that should be added to the created EC2 instance default tags. "
160159 "a tag must have a key and an optional value. see [https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html]" ,
@@ -174,7 +173,7 @@ def _check_valid_instance_names(
174173
175174class PrimaryEC2InstancesSettings (BaseCustomSettings ):
176175 PRIMARY_EC2_INSTANCES_ALLOWED_TYPES : Annotated [
177- Json [ dict [str , EC2InstanceBootSpecific ] ],
176+ dict [str , EC2InstanceBootSpecific ],
178177 Field (
179178 description = "Defines which EC2 instances are considered as candidates for new EC2 instance and their respective boot specific parameters" ,
180179 ),
@@ -186,7 +185,7 @@ class PrimaryEC2InstancesSettings(BaseCustomSettings):
186185 ),
187186 ] = 10
188187 PRIMARY_EC2_INSTANCES_SECURITY_GROUP_IDS : Annotated [
189- Json [ list [str ] ],
188+ list [str ],
190189 Field (
191190 min_length = 1 ,
192191 description = "A security group acts as a virtual firewall for your EC2 instances to control incoming and outgoing traffic"
@@ -195,7 +194,7 @@ class PrimaryEC2InstancesSettings(BaseCustomSettings):
195194 ),
196195 ]
197196 PRIMARY_EC2_INSTANCES_SUBNET_IDS : Annotated [
198- Json [ list [str ] ],
197+ list [str ],
199198 Field (
200199 min_length = 1 ,
201200 description = "A subnet is a range of IP addresses in your VPC "
@@ -214,7 +213,7 @@ class PrimaryEC2InstancesSettings(BaseCustomSettings):
214213 ),
215214 ]
216215 PRIMARY_EC2_INSTANCES_CUSTOM_TAGS : Annotated [
217- Json [ EC2Tags ] ,
216+ EC2Tags ,
218217 Field (
219218 description = "Allows to define tags that should be added to the created EC2 instance default tags. "
220219 "a tag must have a key and an optional value. see [https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html]" ,
0 commit comments