Skip to content

Commit 61e7f2d

Browse files
refactor(event_handler): match to match_results; 3.10 new keyword (aws-powertools#616)
1 parent 25f067a commit 61e7f2d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

aws_lambda_powertools/event_handler/api_gateway.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,10 @@ def _resolve(self) -> ResponseBuilder:
525525
for route in self._routes:
526526
if method != route.method:
527527
continue
528-
match: Optional[re.Match] = route.rule.match(path)
529-
if match:
528+
match_results: Optional[re.Match] = route.rule.match(path)
529+
if match_results:
530530
logger.debug("Found a registered route. Calling function")
531-
return self._call_route(route, match.groupdict()) # pass fn args
531+
return self._call_route(route, match_results.groupdict()) # pass fn args
532532

533533
logger.debug(f"No match found for path {path} and method {method}")
534534
return self._not_found(method)

aws_lambda_powertools/utilities/data_classes/appsync_authorizer_event.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,18 @@ class AppSyncAuthorizerResponse:
6868
is authorized to make calls to the GraphQL API. If this value is
6969
true, execution of the GraphQL API continues. If this value is false,
7070
an UnauthorizedException is raised
71-
max_age: Optional[int]
71+
max_age: int, optional
7272
Set the ttlOverride. The number of seconds that the response should be
7373
cached for. If no value is returned, the value from the API (if configured)
7474
or the default of 300 seconds (five minutes) is used. If this is 0, the response
7575
is not cached.
76-
resolver_context: Optional[Dict[str, Any]]
76+
resolver_context: Dict[str, Any], optional
7777
A JSON object visible as `$ctx.identity.resolverContext` in resolver templates
7878
7979
The resolverContext object only supports key-value pairs. Nested keys are not supported.
8080
8181
Warning: The total size of this JSON object must not exceed 5MB.
82-
deny_fields: Optional[List[str]]
82+
deny_fields: List[str], optional
8383
A list of fields that will be set to `null` regardless of the resolver's return.
8484
8585
A field is either `TypeName.FieldName`, or an ARN such as

0 commit comments

Comments
 (0)