Skip to content

Commit a6df24d

Browse files
author
Michael Brewer
committed
Merge branch 'develop' into feat/amazon-mq
2 parents 914c83e + c3769f3 commit a6df24d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/utilities/middleware_factory.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ You can also have your own keyword arguments after the mandatory arguments.
4747
# Obfuscate email before calling Lambda handler
4848
if fields:
4949
for field in fields:
50-
field = event.get(field, "")
5150
if field in event:
52-
event[field] = obfuscate(field)
51+
event[field] = obfuscate(event[field])
5352

5453
return handler(event, context)
5554

docs/utilities/parser.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ Use the decorator for fail fast scenarios where you want your Lambda function to
5757
=== "event_parser_decorator.py"
5858

5959
```python hl_lines="18"
60-
from aws_lambda_powertools.utilities.parser import event_parser, BaseModel, ValidationError
60+
from aws_lambda_powertools.utilities.parser import event_parser, BaseModel
6161
from aws_lambda_powertools.utilities.typing import LambdaContext
62+
from typing import List, Optional
6263

6364
import json
6465

@@ -80,7 +81,7 @@ Use the decorator for fail fast scenarios where you want your Lambda function to
8081
print(event.description)
8182
print(event.items)
8283

83-
order_items = [items for item in event.items]
84+
order_items = [item for item in event.items]
8485
...
8586

8687
payload = {
@@ -107,6 +108,7 @@ Use this standalone function when you want more control over the data validation
107108

108109
```python hl_lines="21 30"
109110
from aws_lambda_powertools.utilities.parser import parse, BaseModel, ValidationError
111+
from typing import List, Optional
110112

111113
class OrderItem(BaseModel):
112114
id: int

0 commit comments

Comments
 (0)