Skip to content

Commit

Permalink
Fix mypy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bharanidharan14 committed Dec 13, 2022
1 parent fe79076 commit 33bd284
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions astronomer/providers/amazon/aws/hooks/base_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ async def get_role_credentials(
aws_access_key_id=conn_config.aws_access_key_id,
aws_secret_access_key=conn_config.aws_secret_access_key,
) as client:
return_response = None
if conn_config.assume_role_method == "assume_role" or conn_config.assume_role_method is None:
response: Dict[str, Dict[str, str]] = await client.assume_role(
RoleArn=conn_config.role_arn,
RoleSessionName="RoleSession",
**conn_config.assume_role_kwargs,
)
return response["Credentials"]
return None # pragma: no cover
return_response = response["Credentials"]
return return_response

0 comments on commit 33bd284

Please sign in to comment.