Skip to content

Commit 36bc0b4

Browse files
committed
handling flake8 issues
1 parent db4a965 commit 36bc0b4

File tree

1 file changed

+7
-1
lines changed
  • aws_sra_examples/solutions/genai/bedrock_org/lambda/src

1 file changed

+7
-1
lines changed

aws_sra_examples/solutions/genai/bedrock_org/lambda/src/sra_iam.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ def detach_policy(self, role_name: str, policy_arn: str) -> EmptyResponseMetadat
161161
role_name: Name of the role for which the policy is removed from
162162
policy_arn: The Amazon Resource Name (ARN) of the policy to be detached
163163
164+
Raises:
165+
ValueError: If an unexpected error occurs during the operation.
166+
164167
Returns:
165168
Empty response metadata
166169
"""
@@ -175,12 +178,15 @@ def detach_policy(self, role_name: str, policy_arn: str) -> EmptyResponseMetadat
175178
raise ValueError(f"Error detaching policy '{policy_arn}' from role '{role_name}': {error}") from None
176179
return response
177180

178-
def delete_policy(self, policy_arn: str) -> EmptyResponseMetadataTypeDef:
181+
def delete_policy(self, policy_arn: str) -> EmptyResponseMetadataTypeDef: # noqa: CCR001
179182
"""Delete IAM Policy.
180183
181184
Args:
182185
policy_arn: The Amazon Resource Name (ARN) of the policy to be deleted
183186
187+
Raises:
188+
ValueError: If an unexpected error occurs during the operation.
189+
184190
Returns:
185191
Empty response metadata
186192
"""

0 commit comments

Comments
 (0)