Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit 67ed573

Browse files
committed
Fixed mypy issues. Cast Any to str.
1 parent 5b94a72 commit 67ed573

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gcip/addons/aws/helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
import boto3
3+
import boto3 # type: ignore
44

55
sts = boto3.Session().client("sts")
66

@@ -19,7 +19,7 @@ def aws_account_id() -> str:
1919
if os.environ.get("AWS_ACCOUNT_ID"):
2020
return os.environ["AWS_ACCOUNT_ID"]
2121

22-
return sts.get_caller_identity()["Account"]
22+
return str(sts.get_caller_identity()["Account"])
2323

2424

2525
def aws_region() -> str:
@@ -39,7 +39,7 @@ def aws_region() -> str:
3939
if os.environ.get("AWS_DEFAULT_REGION"):
4040
return os.environ["AWS_DEFAULT_REGION"]
4141
elif sts.meta.region_name:
42-
return sts.meta.region_name
42+
return str(sts.meta.region_name)
4343

4444
raise ValueError(
4545
"No resolution to AWS region, neither from API call nor from environment Variable. "

0 commit comments

Comments
 (0)