@@ -338,15 +338,15 @@ def _construct_body_s3_dict(self): # type: ignore[no-untyped-def]
338
338
s3_pointer = self .definition_uri
339
339
340
340
else :
341
-
342
341
# DefinitionUri is a string
343
- s3_pointer = parse_s3_uri (self .definition_uri ) # type: ignore[no-untyped-call]
344
- if s3_pointer is None :
342
+ _parsed_s3_pointer = parse_s3_uri (self .definition_uri )
343
+ if _parsed_s3_pointer is None :
345
344
raise InvalidResourceException (
346
345
self .logical_id ,
347
346
"'DefinitionUri' is not a valid S3 Uri of the form "
348
347
"'s3://bucket/key' with optional versionId query parameter." ,
349
348
)
349
+ s3_pointer = _parsed_s3_pointer
350
350
351
351
if isinstance (self .definition_uri , Py27UniStr ):
352
352
# self.defintion_uri is a Py27UniStr instance if it is defined in the template
@@ -394,8 +394,8 @@ def _construct_stage(self, deployment, swagger, redeploy_restapi_parameters): #
394
394
if stage_name_prefix .isalnum ():
395
395
stage_logical_id = self .logical_id + stage_name_prefix + "Stage"
396
396
else :
397
- generator = LogicalIdGenerator (self .logical_id + "Stage" , stage_name_prefix ) # type: ignore[no-untyped-call]
398
- stage_logical_id = generator .gen () # type: ignore[no-untyped-call]
397
+ generator = LogicalIdGenerator (self .logical_id + "Stage" , stage_name_prefix )
398
+ stage_logical_id = generator .gen ()
399
399
stage = ApiGatewayStage (stage_logical_id , attributes = self .passthrough_resource_attributes )
400
400
stage .RestApiId = ref (self .logical_id )
401
401
stage .update_deployment_ref (deployment .logical_id ) # type: ignore[no-untyped-call]
@@ -414,7 +414,7 @@ def _construct_stage(self, deployment, swagger, redeploy_restapi_parameters): #
414
414
)
415
415
416
416
if self .tags is not None :
417
- stage .Tags = get_tag_list (self .tags ) # type: ignore[no-untyped-call]
417
+ stage .Tags = get_tag_list (self .tags )
418
418
419
419
return stage
420
420
@@ -432,7 +432,7 @@ def _construct_api_domain(self, rest_api, route53_record_set_groups): # type: i
432
432
)
433
433
434
434
self .domain ["ApiDomainName" ] = "{}{}" .format (
435
- "ApiGatewayDomainName" , LogicalIdGenerator ("" , self .domain .get ("DomainName" )).gen () # type: ignore[no-untyped-call, no-untyped-call]
435
+ "ApiGatewayDomainName" , LogicalIdGenerator ("" , self .domain .get ("DomainName" )).gen ()
436
436
)
437
437
438
438
domain = ApiGatewayDomainName (self .domain .get ("ApiDomainName" ), attributes = self .passthrough_resource_attributes )
@@ -537,7 +537,7 @@ def _construct_api_domain(self, rest_api, route53_record_set_groups): # type: i
537
537
"HostedZoneId or HostedZoneName is required to enable Route53 support on Custom Domains." ,
538
538
)
539
539
540
- logical_id_suffix = LogicalIdGenerator ( # type: ignore[no-untyped-call, no-untyped-call]
540
+ logical_id_suffix = LogicalIdGenerator (
541
541
"" , route53 .get ("HostedZoneId" ) or route53 .get ("HostedZoneName" )
542
542
).gen ()
543
543
logical_id = "RecordSetGroup" + logical_id_suffix
@@ -593,7 +593,7 @@ def _construct_alias_target(self, domain): # type: ignore[no-untyped-def]
593
593
alias_target ["DNSName" ] = route53 .get ("DistributionDomainName" )
594
594
return alias_target
595
595
596
- @cw_timer (prefix = "Generator" , name = "Api" ) # type: ignore[no-untyped-call]
596
+ @cw_timer (prefix = "Generator" , name = "Api" )
597
597
def to_cloudformation (self , redeploy_restapi_parameters , route53_record_set_groups ): # type: ignore[no-untyped-def]
598
598
"""Generates CloudFormation resources from a SAM API resource
599
599
0 commit comments