Skip to content

Commit 66f7c0c

Browse files
author
Tom McCarthy
committed
chore: add comment explaining tuple conversion
1 parent 76ed8e6 commit 66f7c0c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

aws_lambda_powertools/event_handler/api_gateway.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ def route(
688688
cache_control: Optional[str] = None,
689689
):
690690
def register_route(func: Callable):
691+
# Convert methods to tuple. It needs to be hashable as its part of the self._routes dict key
691692
methods = (method,) if isinstance(method, str) else tuple(method)
692693
self._routes[(rule, methods, cors, compress, cache_control)] = func
693694

0 commit comments

Comments
 (0)