Skip to content

Commit 2046d57

Browse files
committed
fix mypy
1 parent 7345c34 commit 2046d57

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: aws_lambda_powertools/metrics/provider/cloudwatch_emf/cloudwatch.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def is_metrics_disabled() -> bool:
9494
if constants.METRICS_DISABLED_ENV not in os.environ:
9595
return False
9696

97-
is_disabled = resolve_truthy_env_var_choice(env=os.getenv(constants.METRICS_DISABLED_ENV))
97+
env_value = os.getenv(constants.METRICS_DISABLED_ENV)
98+
is_disabled = resolve_truthy_env_var_choice(env=env_value or "false")
9899
if is_disabled:
99100
logger.debug("Metrics have been disabled via env var POWERTOOLS_METRICS_DISABLED")
100101
return bool(is_disabled)

Diff for: aws_lambda_powertools/metrics/provider/datadog/datadog.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def is_metrics_disabled() -> bool:
7373
if constants.METRICS_DISABLED_ENV not in os.environ:
7474
return False
7575

76-
is_disabled = resolve_truthy_env_var_choice(env=os.getenv(constants.METRICS_DISABLED_ENV))
76+
env_value = os.getenv(constants.METRICS_DISABLED_ENV)
77+
is_disabled = resolve_truthy_env_var_choice(env=env_value or "false")
7778
if is_disabled:
7879
logger.debug("Metrics have been disabled via env var POWERTOOLS_METRICS_DISABLED")
7980
return bool(is_disabled)

0 commit comments

Comments
 (0)