Skip to content

Commit db2a7ba

Browse files
committed
docs(multiple): fix highlighting after new isort/black integration
1 parent 5c0b3cb commit db2a7ba

18 files changed

+66
-26
lines changed

docs/core/event_handler/api_gateway.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,15 @@ By default, we return `404` for any unmatched route.
214214

215215
You can use **`not_found`** decorator to override this behavior, and return a custom **`Response`**.
216216

217-
```python hl_lines="14 18" title="Handling not found"
217+
```python hl_lines="18 22" title="Handling not found"
218218
--8<-- "examples/event_handler_rest/src/not_found_routes.py"
219219
```
220220

221221
### Exception handling
222222

223223
You can use **`exception_handler`** decorator with any Python exception. This allows you to handle a common exception outside your route, for example validation errors.
224224

225-
```python hl_lines="13-14" title="Exception handling"
225+
```python hl_lines="17-18" title="Exception handling"
226226
--8<-- "examples/event_handler_rest/src/exception_handling.py"
227227
```
228228

@@ -316,7 +316,7 @@ You can use the `Response` class to have full control over the response, for exa
316316

317317
=== "fine_grained_responses.py"
318318

319-
```python hl_lines="7 24-28"
319+
```python hl_lines="9 28-32"
320320
--8<-- "examples/event_handler_rest/src/fine_grained_responses.py"
321321
```
322322

@@ -364,7 +364,7 @@ Like `compress` feature, the client must send the `Accept` header with the corre
364364
Lambda Function URLs handle binary media types automatically.
365365
=== "binary_responses.py"
366366

367-
```python hl_lines="14 20"
367+
```python hl_lines="17 23"
368368
--8<-- "examples/event_handler_rest/src/binary_responses.py"
369369
```
370370

docs/core/event_handler/appsync.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ You can subclass [AppSyncResolverEvent](../../utilities/data_classes.md#appsync-
185185

186186
=== "custom_models.py.py"
187187

188-
```python hl_lines="11 14 30-32 35-36 43 50"
188+
```python hl_lines="11 14 32-34 37-38 45 52"
189189
--8<-- "examples/event_handler_graphql/src/custom_models.py"
190190
```
191191

@@ -281,7 +281,7 @@ And an example for testing asynchronous resolvers. Note that this requires the `
281281

282282
=== "assert_async_graphql_response.py"
283283

284-
```python hl_lines="28"
284+
```python hl_lines="31"
285285
--8<-- "examples/event_handler_graphql/src/assert_async_graphql_response.py"
286286
```
287287

docs/utilities/jmespath_functions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ We provide built-in envelopes for popular AWS Lambda event sources to easily dec
5252

5353
=== "extract_data_from_builtin_envelope.py"
5454

55-
```python hl_lines="1 6"
55+
```python hl_lines="1-4 9"
5656
--8<-- "examples/jmespath_functions/src/extract_data_from_builtin_envelope.py"
5757
```
5858

@@ -116,7 +116,7 @@ This sample will deserialize the JSON string within the `body` key before [Idemp
116116

117117
=== "powertools_json_idempotency_jmespath.py"
118118

119-
```python hl_lines="12"
119+
```python hl_lines="16"
120120
--8<-- "examples/jmespath_functions/src/powertools_json_idempotency_jmespath.py"
121121
```
122122

@@ -185,7 +185,7 @@ Here is an example of how to decompress messages using [snappy](https://github.c
185185

186186
=== "powertools_custom_jmespath_function.py"
187187

188-
```python hl_lines="8 11 14-15 20 31 36 38 40"
188+
```python hl_lines="9 14 17-18 23 34 39 41 43"
189189
--8<-- "examples/jmespath_functions/src/powertools_custom_jmespath_function.py"
190190
```
191191

docs/utilities/middleware_factory.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can create your own middleware using `lambda_handler_decorator`. The decorat
3030
### Middleware with before logic
3131

3232
=== "getting_started_middleware_before_logic_function.py"
33-
```python hl_lines="5 23 24 29 30 32 37 38"
33+
```python hl_lines="5 26 27 32 33 35 40 41"
3434
--8<-- "examples/middleware_factory/src/getting_started_middleware_before_logic_function.py"
3535
```
3636

@@ -58,7 +58,7 @@ You can create your own middleware using `lambda_handler_decorator`. The decorat
5858
You can also have your own keyword arguments after the mandatory arguments.
5959

6060
=== "getting_started_middleware_with_params_function.py"
61-
```python hl_lines="6 27 28 29 33 49"
61+
```python hl_lines="6 30 31 32 36 52"
6262
--8<-- "examples/middleware_factory/src/getting_started_middleware_with_params_function.py"
6363
```
6464

docs/utilities/validation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Here is a sample custom EventBridge event, where we only validate what's inside
9191

9292
=== "getting_started_validator_unwrapping_function.py"
9393

94-
```python hl_lines="2 6 12"
94+
```python hl_lines="2 8 14"
9595
--8<-- "examples/validation/src/getting_started_validator_unwrapping_function.py"
9696
```
9797

@@ -117,7 +117,7 @@ We provide built-in envelopes to easily extract the payload from popular event s
117117

118118
=== "unwrapping_popular_event_source_function.py"
119119

120-
```python hl_lines="2 7 12"
120+
```python hl_lines="2 9 14"
121121
--8<-- "examples/validation/src/unwrapping_popular_event_source_function.py"
122122
```
123123

examples/event_handler_graphql/src/assert_async_graphql_response.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
from typing import List
55

66
import pytest
7-
from assert_async_graphql_response_module import Todo, app # instance of AppSyncResolver
7+
from assert_async_graphql_response_module import ( # instance of AppSyncResolver
8+
Todo,
9+
app,
10+
)
811

912

1013
@pytest.fixture

examples/event_handler_graphql/src/custom_models.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
from aws_lambda_powertools.event_handler import AppSyncResolver
1212
from aws_lambda_powertools.logging import correlation_paths
1313
from aws_lambda_powertools.utilities.data_classes.appsync import scalar_types_utils
14-
from aws_lambda_powertools.utilities.data_classes.appsync_resolver_event import AppSyncResolverEvent
14+
from aws_lambda_powertools.utilities.data_classes.appsync_resolver_event import (
15+
AppSyncResolverEvent,
16+
)
1517
from aws_lambda_powertools.utilities.typing import LambdaContext
1618

1719
tracer = Tracer()

examples/event_handler_rest/src/binary_responses.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
from pathlib import Path
33

44
from aws_lambda_powertools import Logger, Tracer
5-
from aws_lambda_powertools.event_handler.api_gateway import APIGatewayRestResolver, Response
5+
from aws_lambda_powertools.event_handler.api_gateway import (
6+
APIGatewayRestResolver,
7+
Response,
8+
)
69
from aws_lambda_powertools.logging import correlation_paths
710
from aws_lambda_powertools.utilities.typing import LambdaContext
811

examples/event_handler_rest/src/exception_handling.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import requests
22

33
from aws_lambda_powertools import Logger, Tracer
4-
from aws_lambda_powertools.event_handler import APIGatewayRestResolver, Response, content_types
4+
from aws_lambda_powertools.event_handler import (
5+
APIGatewayRestResolver,
6+
Response,
7+
content_types,
8+
)
59
from aws_lambda_powertools.logging import correlation_paths
610
from aws_lambda_powertools.utilities.typing import LambdaContext
711

examples/event_handler_rest/src/fine_grained_responses.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
import requests
55

66
from aws_lambda_powertools import Logger, Tracer
7-
from aws_lambda_powertools.event_handler import APIGatewayRestResolver, Response, content_types
7+
from aws_lambda_powertools.event_handler import (
8+
APIGatewayRestResolver,
9+
Response,
10+
content_types,
11+
)
812
from aws_lambda_powertools.logging import correlation_paths
913
from aws_lambda_powertools.utilities.typing import LambdaContext
1014

examples/event_handler_rest/src/not_found_routes.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import requests
22

33
from aws_lambda_powertools import Logger, Tracer
4-
from aws_lambda_powertools.event_handler import APIGatewayRestResolver, Response, content_types
4+
from aws_lambda_powertools.event_handler import (
5+
APIGatewayRestResolver,
6+
Response,
7+
content_types,
8+
)
59
from aws_lambda_powertools.event_handler.exceptions import NotFoundError
610
from aws_lambda_powertools.logging import correlation_paths
711
from aws_lambda_powertools.utilities.typing import LambdaContext

examples/jmespath_functions/src/extract_data_from_builtin_envelope.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
from aws_lambda_powertools.utilities.jmespath_utils import envelopes, extract_data_from_envelope
1+
from aws_lambda_powertools.utilities.jmespath_utils import (
2+
envelopes,
3+
extract_data_from_envelope,
4+
)
25
from aws_lambda_powertools.utilities.typing import LambdaContext
36

47

examples/jmespath_functions/src/powertools_custom_jmespath_function.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
from jmespath.exceptions import JMESPathTypeError
66
from jmespath.functions import signature
77

8-
from aws_lambda_powertools.utilities.jmespath_utils import PowertoolsFunctions, extract_data_from_envelope
8+
from aws_lambda_powertools.utilities.jmespath_utils import (
9+
PowertoolsFunctions,
10+
extract_data_from_envelope,
11+
)
912

1013

1114
class CustomFunctions(PowertoolsFunctions):

examples/jmespath_functions/src/powertools_json_idempotency_jmespath.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

44
import requests
55

6-
from aws_lambda_powertools.utilities.idempotency import DynamoDBPersistenceLayer, IdempotencyConfig, idempotent
6+
from aws_lambda_powertools.utilities.idempotency import (
7+
DynamoDBPersistenceLayer,
8+
IdempotencyConfig,
9+
idempotent,
10+
)
711

812
persistence_layer = DynamoDBPersistenceLayer(table_name="IdempotencyTable")
913

examples/middleware_factory/src/getting_started_middleware_before_logic_function.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
from uuid import uuid4
44

55
from aws_lambda_powertools.middleware_factory import lambda_handler_decorator
6-
from aws_lambda_powertools.utilities.jmespath_utils import envelopes, extract_data_from_envelope
6+
from aws_lambda_powertools.utilities.jmespath_utils import (
7+
envelopes,
8+
extract_data_from_envelope,
9+
)
710
from aws_lambda_powertools.utilities.typing import LambdaContext
811

912

examples/middleware_factory/src/getting_started_middleware_with_params_function.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
from uuid import uuid4
55

66
from aws_lambda_powertools.middleware_factory import lambda_handler_decorator
7-
from aws_lambda_powertools.utilities.jmespath_utils import envelopes, extract_data_from_envelope
7+
from aws_lambda_powertools.utilities.jmespath_utils import (
8+
envelopes,
9+
extract_data_from_envelope,
10+
)
811
from aws_lambda_powertools.utilities.typing import LambdaContext
912

1013

examples/validation/src/getting_started_validator_unwrapping_function.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import boto3
22
import getting_started_validator_unwrapping_schema as schemas
33

4-
from aws_lambda_powertools.utilities.data_classes.event_bridge_event import EventBridgeEvent
4+
from aws_lambda_powertools.utilities.data_classes.event_bridge_event import (
5+
EventBridgeEvent,
6+
)
57
from aws_lambda_powertools.utilities.typing import LambdaContext
68
from aws_lambda_powertools.utilities.validation import validator
79

examples/validation/src/unwrapping_popular_event_source_function.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
import unwrapping_popular_event_source_schema as schemas
33
from botocore.exceptions import ClientError
44

5-
from aws_lambda_powertools.utilities.data_classes.event_bridge_event import EventBridgeEvent
5+
from aws_lambda_powertools.utilities.data_classes.event_bridge_event import (
6+
EventBridgeEvent,
7+
)
68
from aws_lambda_powertools.utilities.typing import LambdaContext
79
from aws_lambda_powertools.utilities.validation import envelopes, validator
810

0 commit comments

Comments
 (0)