From c18b81c4f7806008a12f8237d97620a64c26dd49 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Mon, 16 Aug 2021 14:55:07 -0700 Subject: [PATCH] fix: rename match variable for py3.10 --- aws_lambda_powertools/event_handler/api_gateway.py | 6 +++--- .../utilities/data_classes/appsync_authorizer_event.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aws_lambda_powertools/event_handler/api_gateway.py b/aws_lambda_powertools/event_handler/api_gateway.py index 7bf364695da..b7204fa41c0 100644 --- a/aws_lambda_powertools/event_handler/api_gateway.py +++ b/aws_lambda_powertools/event_handler/api_gateway.py @@ -525,10 +525,10 @@ def _resolve(self) -> ResponseBuilder: for route in self._routes: if method != route.method: continue - match: Optional[re.Match] = route.rule.match(path) - if match: + match_results: Optional[re.Match] = route.rule.match(path) + if match_results: logger.debug("Found a registered route. Calling function") - return self._call_route(route, match.groupdict()) # pass fn args + return self._call_route(route, match_results.groupdict()) # pass fn args logger.debug(f"No match found for path {path} and method {method}") return self._not_found(method) diff --git a/aws_lambda_powertools/utilities/data_classes/appsync_authorizer_event.py b/aws_lambda_powertools/utilities/data_classes/appsync_authorizer_event.py index be2e2f38429..b9366871211 100644 --- a/aws_lambda_powertools/utilities/data_classes/appsync_authorizer_event.py +++ b/aws_lambda_powertools/utilities/data_classes/appsync_authorizer_event.py @@ -68,18 +68,18 @@ class AppSyncAuthorizerResponse: is authorized to make calls to the GraphQL API. If this value is true, execution of the GraphQL API continues. If this value is false, an UnauthorizedException is raised - max_age: Optional[int] + max_age: int, optional Set the ttlOverride. The number of seconds that the response should be cached for. If no value is returned, the value from the API (if configured) or the default of 300 seconds (five minutes) is used. If this is 0, the response is not cached. - resolver_context: Optional[Dict[str, Any]] + resolver_context: Dict[str, Any], optional A JSON object visible as `$ctx.identity.resolverContext` in resolver templates The resolverContext object only supports key-value pairs. Nested keys are not supported. Warning: The total size of this JSON object must not exceed 5MB. - deny_fields: Optional[List[str]] + deny_fields: List[str], optional A list of fields that will be set to `null` regardless of the resolver's return. A field is either `TypeName.FieldName`, or an ARN such as