Skip to content

Commit 4e8329d

Browse files
committed
chore: consistently reference constants env variables
1 parent dcc34b0 commit 4e8329d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aws_lambda_powertools/utilities/idempotency/idempotency.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Any, Callable, Dict, Optional, cast
88

99
from aws_lambda_powertools.middleware_factory import lambda_handler_decorator
10-
from aws_lambda_powertools.shared.constants import IDEMPOTENCY_DISABLED_ENV
10+
from aws_lambda_powertools.shared import constants
1111
from aws_lambda_powertools.shared.types import AnyCallableT
1212
from aws_lambda_powertools.utilities.idempotency.base import IdempotencyHandler
1313
from aws_lambda_powertools.utilities.idempotency.config import IdempotencyConfig
@@ -58,7 +58,7 @@ def idempotent(
5858
>>> return {"StatusCode": 200}
5959
"""
6060

61-
if os.getenv(IDEMPOTENCY_DISABLED_ENV):
61+
if os.getenv(constants.IDEMPOTENCY_DISABLED_ENV):
6262
return handler(event, context)
6363

6464
config = config or IdempotencyConfig()
@@ -127,7 +127,7 @@ def process_order(customer_id: str, order: dict, **kwargs):
127127

128128
@functools.wraps(function)
129129
def decorate(*args, **kwargs):
130-
if os.getenv(IDEMPOTENCY_DISABLED_ENV):
130+
if os.getenv(constants.IDEMPOTENCY_DISABLED_ENV):
131131
return function(*args, **kwargs)
132132

133133
payload = kwargs.get(data_keyword_argument)

0 commit comments

Comments
 (0)