Skip to content

Commit e88785b

Browse files
authored
chore: add stricter typing to construct assume role policy function (#2965)
1 parent f81f65c commit e88785b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

samtranslator/model/iam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class IAMManagedPolicy(Resource):
3333

3434
class IAMRolePolicies:
3535
@classmethod
36-
def construct_assume_role_policy_for_service_principal(cls, service_principal): # type: ignore[no-untyped-def]
36+
def construct_assume_role_policy_for_service_principal(cls, service_principal: str) -> Dict[str, Any]:
3737
return {
3838
"Version": "2012-10-17",
3939
"Statement": [

samtranslator/model/stepfunctions/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _construct_role(self, resource, permissions_boundary=None, prefix=None, suff
6363
"""
6464
role_logical_id = self._generate_logical_id(prefix=prefix, suffix=suffix, resource_type="Role") # type: ignore[no-untyped-call]
6565
event_role = IAMRole(role_logical_id, attributes=resource.get_passthrough_resource_attributes())
66-
event_role.AssumeRolePolicyDocument = IAMRolePolicies.construct_assume_role_policy_for_service_principal( # type: ignore[no-untyped-call]
66+
event_role.AssumeRolePolicyDocument = IAMRolePolicies.construct_assume_role_policy_for_service_principal(
6767
self.principal
6868
)
6969
state_machine_arn = resource.get_runtime_attr("arn")

0 commit comments

Comments
 (0)