Skip to content

Commit fe45ff7

Browse files
committed
fix: lint files
1 parent cc18880 commit fe45ff7

File tree

12 files changed

+67
-17
lines changed

12 files changed

+67
-17
lines changed

aws_lambda_powertools/event_handler/api_gateway.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727
from aws_lambda_powertools.event_handler import content_types
2828
from aws_lambda_powertools.event_handler.exceptions import NotFoundError, ServiceError
2929
from aws_lambda_powertools.shared import constants
30-
from aws_lambda_powertools.shared.functions import powertools_dev_is_set, strtobool
3130
from aws_lambda_powertools.shared.cookies import Cookie
32-
from aws_lambda_powertools.shared.functions import resolve_truthy_env_var_choice
31+
from aws_lambda_powertools.shared.functions import powertools_dev_is_set, strtobool
3332
from aws_lambda_powertools.shared.json_encoder import Encoder
3433
from aws_lambda_powertools.utilities.data_classes import (
3534
ALBEvent,

aws_lambda_powertools/utilities/data_classes/alb_event.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
MultiValueHeadersSerializer,
66
SingleValueHeadersSerializer,
77
)
8-
from aws_lambda_powertools.utilities.data_classes.common import BaseProxyEvent, DictWrapper
8+
from aws_lambda_powertools.utilities.data_classes.common import (
9+
BaseProxyEvent,
10+
DictWrapper,
11+
)
912

1013

1114
class ALBEventRequestContext(DictWrapper):

tests/e2e/event_handler/handlers/api_gateway_http_handler.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from aws_lambda_powertools.event_handler import APIGatewayHttpResolver, Response, content_types
1+
from aws_lambda_powertools.event_handler import (
2+
APIGatewayHttpResolver,
3+
Response,
4+
content_types,
5+
)
26

37
app = APIGatewayHttpResolver()
48

tests/e2e/event_handler/handlers/api_gateway_rest_handler.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from aws_lambda_powertools.event_handler import APIGatewayRestResolver, Response, content_types
1+
from aws_lambda_powertools.event_handler import (
2+
APIGatewayRestResolver,
3+
Response,
4+
content_types,
5+
)
26

37
app = APIGatewayRestResolver()
48

tests/e2e/event_handler/handlers/lambda_function_url_handler.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from aws_lambda_powertools.event_handler import LambdaFunctionUrlResolver, Response, content_types
1+
from aws_lambda_powertools.event_handler import (
2+
LambdaFunctionUrlResolver,
3+
Response,
4+
content_types,
5+
)
26

37
app = LambdaFunctionUrlResolver()
48

tests/e2e/idempotency/handlers/parallel_execution_handler.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import os
22
import time
33

4-
from aws_lambda_powertools.utilities.idempotency import DynamoDBPersistenceLayer, idempotent
4+
from aws_lambda_powertools.utilities.idempotency import (
5+
DynamoDBPersistenceLayer,
6+
idempotent,
7+
)
58

69
TABLE_NAME = os.getenv("IdempotencyTable", "")
710
persistence_layer = DynamoDBPersistenceLayer(table_name=TABLE_NAME)

tests/e2e/idempotency/handlers/ttl_cache_expiration_handler.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import os
22
import time
33

4-
from aws_lambda_powertools.utilities.idempotency import DynamoDBPersistenceLayer, IdempotencyConfig, idempotent
4+
from aws_lambda_powertools.utilities.idempotency import (
5+
DynamoDBPersistenceLayer,
6+
IdempotencyConfig,
7+
idempotent,
8+
)
59

610
TABLE_NAME = os.getenv("IdempotencyTable", "")
711
persistence_layer = DynamoDBPersistenceLayer(table_name=TABLE_NAME)

tests/e2e/idempotency/handlers/ttl_cache_timeout_handler.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import os
22
import time
33

4-
from aws_lambda_powertools.utilities.idempotency import DynamoDBPersistenceLayer, IdempotencyConfig, idempotent
4+
from aws_lambda_powertools.utilities.idempotency import (
5+
DynamoDBPersistenceLayer,
6+
IdempotencyConfig,
7+
idempotent,
8+
)
59

610
TABLE_NAME = os.getenv("IdempotencyTable", "")
711
persistence_layer = DynamoDBPersistenceLayer(table_name=TABLE_NAME)

tests/e2e/parameters/infrastructure.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ def _create_app_config(self, function: Function):
1818
service_name = build_service_name()
1919

2020
cfn_application = appconfig.CfnApplication(
21-
self.stack, id="appconfig-app", name=f"powertools-e2e-{service_name}", description="Lambda Powertools End-to-End testing for AppConfig"
21+
self.stack,
22+
id="appconfig-app",
23+
name=f"powertools-e2e-{service_name}",
24+
description="Lambda Powertools End-to-End testing for AppConfig",
2225
)
2326
CfnOutput(self.stack, "AppConfigApplication", value=cfn_application.name)
2427

tests/e2e/utils/infrastructure.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,23 @@
1111
import boto3
1212
import pytest
1313
from aws_cdk import App, CfnOutput, Environment, RemovalPolicy, Stack, aws_logs
14-
from aws_cdk.aws_lambda import Architecture, Code, Function, LayerVersion, Runtime, Tracing
14+
from aws_cdk.aws_lambda import (
15+
Architecture,
16+
Code,
17+
Function,
18+
LayerVersion,
19+
Runtime,
20+
Tracing,
21+
)
1522
from filelock import FileLock
1623
from mypy_boto3_cloudformation import CloudFormationClient
1724

1825
from tests.e2e.utils.base import InfrastructureProvider
19-
from tests.e2e.utils.constants import CDK_OUT_PATH, PYTHON_RUNTIME_VERSION, SOURCE_CODE_ROOT_PATH
26+
from tests.e2e.utils.constants import (
27+
CDK_OUT_PATH,
28+
PYTHON_RUNTIME_VERSION,
29+
SOURCE_CODE_ROOT_PATH,
30+
)
2031
from tests.e2e.utils.lambda_layer.powertools_layer import LocalLambdaPowertoolsLayer
2132

2233
logger = logging.getLogger(__name__)

tests/functional/event_handler/test_lambda_function_url.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from aws_lambda_powertools.event_handler import LambdaFunctionUrlResolver, Response, content_types
1+
from aws_lambda_powertools.event_handler import (
2+
LambdaFunctionUrlResolver,
3+
Response,
4+
content_types,
5+
)
26
from aws_lambda_powertools.shared.cookies import Cookie
37
from aws_lambda_powertools.utilities.data_classes import LambdaFunctionUrlEvent
48
from tests.functional.utils import load_event

tests/functional/test_utilities_batch.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@
55
import pytest
66
from botocore.config import Config
77

8-
from aws_lambda_powertools.utilities.batch import BatchProcessor, EventType, batch_processor
8+
from aws_lambda_powertools.utilities.batch import (
9+
BatchProcessor,
10+
EventType,
11+
batch_processor,
12+
)
913
from aws_lambda_powertools.utilities.batch.exceptions import BatchProcessingError
10-
from aws_lambda_powertools.utilities.data_classes.dynamo_db_stream_event import DynamoDBRecord
11-
from aws_lambda_powertools.utilities.data_classes.kinesis_stream_event import KinesisStreamRecord
14+
from aws_lambda_powertools.utilities.data_classes.dynamo_db_stream_event import (
15+
DynamoDBRecord,
16+
)
17+
from aws_lambda_powertools.utilities.data_classes.kinesis_stream_event import (
18+
KinesisStreamRecord,
19+
)
1220
from aws_lambda_powertools.utilities.data_classes.sqs_event import SQSRecord
1321
from aws_lambda_powertools.utilities.parser import BaseModel, validator
1422
from aws_lambda_powertools.utilities.parser.models import (
@@ -23,7 +31,6 @@
2331
SqsRecordModel,
2432
)
2533
from aws_lambda_powertools.utilities.parser.types import Literal
26-
from aws_lambda_powertools.utilities.typing import LambdaContext
2734
from tests.functional.utils import b64_to_str, str_to_b64
2835

2936

0 commit comments

Comments
 (0)