Skip to content

Commit df633f6

Browse files
committed
chore(mypy): resolve myopy static typing issues, make response+hook properly optional
1 parent 445d7fc commit df633f6

File tree

1 file changed

+3
-3
lines changed
  • aws_lambda_powertools/utilities/idempotency

1 file changed

+3
-3
lines changed

aws_lambda_powertools/utilities/idempotency/config.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def status(self) -> str:
2727
return self._status
2828

2929
@property
30-
def expiry_timestamp(self) -> int:
30+
def expiry_timestamp(self) -> Optional[int]:
3131
return self._expiry_timestamp
3232

3333

@@ -52,7 +52,7 @@ def __init__(
5252
local_cache_max_items: int = 256,
5353
hash_function: str = "md5",
5454
lambda_context: Optional[LambdaContext] = None,
55-
response_hook: IdempotentHookFunction = None,
55+
response_hook: Optional[IdempotentHookFunction] = None,
5656
):
5757
"""
5858
Initialize the base persistence layer
@@ -87,7 +87,7 @@ def __init__(
8787
self.local_cache_max_items = local_cache_max_items
8888
self.hash_function = hash_function
8989
self.lambda_context: Optional[LambdaContext] = lambda_context
90-
self.response_hook: IdempotentHookFunction = response_hook
90+
self.response_hook: Optional[IdempotentHookFunction] = response_hook
9191

9292
def register_lambda_context(self, lambda_context: LambdaContext):
9393
"""Captures the Lambda context, to calculate the remaining time before the invocation times out"""

0 commit comments

Comments
 (0)