Skip to content

Commit 06e4596

Browse files
committed
lint
1 parent b2cc1ba commit 06e4596

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

datadog_lambda/api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def decrypt_kms_api_key(kms_client, ciphertext):
5050
def get_api_key() -> str:
5151
"""
5252
Gets the Datadog API key from the environment variables or secrets manager.
53-
Extracts the result to a global value to avoid repeated calls to the secrets manager from different products.
53+
Extracts the result to a global value to avoid repeated calls to the
54+
secrets manager from different products.
5455
"""
5556
global api_key
5657
if api_key:
@@ -61,9 +62,7 @@ def get_api_key() -> str:
6162
DD_API_KEY_SECRET_ARN = os.environ.get("DD_API_KEY_SECRET_ARN", "")
6263
DD_API_KEY_SSM_NAME = os.environ.get("DD_API_KEY_SSM_NAME", "")
6364
DD_KMS_API_KEY = os.environ.get("DD_KMS_API_KEY", "")
64-
DD_API_KEY = os.environ.get(
65-
"DD_API_KEY", os.environ.get("DATADOG_API_KEY", "")
66-
)
65+
DD_API_KEY = os.environ.get("DD_API_KEY", os.environ.get("DATADOG_API_KEY", ""))
6766

6867
if DD_API_KEY_SECRET_ARN:
6968
api_key = boto3.client("secretsmanager").get_secret_value(

0 commit comments

Comments
 (0)