Skip to content

Commit bd18cd3

Browse files
committed
chore: linting
1 parent c84bb57 commit bd18cd3

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

aws_lambda_powertools/tracing/tracer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ def __build_config(
720720
patch_modules: Union[List, Tuple] = None,
721721
provider: BaseProvider = None,
722722
):
723-
""" Populates Tracer config for new and existing initializations """
723+
"""Populates Tracer config for new and existing initializations"""
724724
is_disabled = disabled if disabled is not None else self._is_tracer_disabled()
725725
is_service = resolve_env_var_choice(choice=service, env=os.getenv(constants.SERVICE_NAME_ENV))
726726

aws_lambda_powertools/utilities/data_classes/api_gateway_proxy_event.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def path(self) -> str:
164164

165165
@property
166166
def stage(self) -> str:
167-
"""The deployment stage of the API request """
167+
"""The deployment stage of the API request"""
168168
return self["requestContext"]["stage"]
169169

170170
@property
@@ -352,7 +352,7 @@ def authorizer(self) -> Optional[RequestContextV2Authorizer]:
352352

353353
@property
354354
def domain_name(self) -> str:
355-
"""A domain name """
355+
"""A domain name"""
356356
return self["requestContext"]["domainName"]
357357

358358
@property
@@ -375,7 +375,7 @@ def route_key(self) -> str:
375375

376376
@property
377377
def stage(self) -> str:
378-
"""The deployment stage of the API request """
378+
"""The deployment stage of the API request"""
379379
return self["requestContext"]["stage"]
380380

381381
@property

aws_lambda_powertools/utilities/data_classes/appsync_resolver_event.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AppSyncIdentityIAM(DictWrapper):
2222

2323
@property
2424
def source_ip(self) -> List[str]:
25-
"""The source IP address of the caller received by AWS AppSync. """
25+
"""The source IP address of the caller received by AWS AppSync."""
2626
return self["sourceIp"]
2727

2828
@property
@@ -67,7 +67,7 @@ class AppSyncIdentityCognito(DictWrapper):
6767

6868
@property
6969
def source_ip(self) -> List[str]:
70-
"""The source IP address of the caller received by AWS AppSync. """
70+
"""The source IP address of the caller received by AWS AppSync."""
7171
return self["sourceIp"]
7272

7373
@property

aws_lambda_powertools/utilities/data_classes/event_bridge_event.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def detail_type(self) -> str:
6060

6161
@property
6262
def detail(self) -> Dict[str, Any]:
63-
"""A JSON object, whose content is at the discretion of the service originating the event. """
63+
"""A JSON object, whose content is at the discretion of the service originating the event."""
6464
return self["detail"]
6565

6666
@property

aws_lambda_powertools/utilities/data_classes/s3_object_event.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def payload(self) -> str:
5353

5454

5555
class S3ObjectUserRequest(DictWrapper):
56-
""" Information about the original call to S3 Object Lambda."""
56+
"""Information about the original call to S3 Object Lambda."""
5757

5858
@property
5959
def url(self) -> str:

aws_lambda_powertools/utilities/data_classes/sns_event.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def message_id(self) -> str:
4646

4747
@property
4848
def message(self) -> str:
49-
"""A string that describes the message. """
49+
"""A string that describes the message."""
5050
return self["Sns"]["Message"]
5151

5252
@property

aws_lambda_powertools/utilities/data_classes/sqs_event.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def binary_value(self) -> Optional[str]:
7070

7171
@property
7272
def data_type(self) -> str:
73-
""" The message attribute data type. Supported types include `String`, `Number`, and `Binary`."""
73+
"""The message attribute data type. Supported types include `String`, `Number`, and `Binary`."""
7474
return self["dataType"]
7575

7676

@@ -120,7 +120,7 @@ def md5_of_body(self) -> str:
120120

121121
@property
122122
def event_source(self) -> str:
123-
"""The AWS service from which the SQS record originated. For SQS, this is `aws:sqs` """
123+
"""The AWS service from which the SQS record originated. For SQS, this is `aws:sqs`"""
124124
return self["eventSource"]
125125

126126
@property

aws_lambda_powertools/utilities/idempotency/persistence/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class BasePersistenceLayer(ABC):
110110
"""
111111

112112
def __init__(self):
113-
"""Initialize the defaults """
113+
"""Initialize the defaults"""
114114
self.configured = False
115115
self.event_key_jmespath: Optional[str] = None
116116
self.event_key_compiled_jmespath = None

tests/functional/test_metrics.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def a_hundred_metrics() -> List[Dict[str, str]]:
8585
def serialize_metrics(
8686
metrics: List[Dict], dimensions: List[Dict], namespace: str, metadatas: List[Dict] = None
8787
) -> Dict:
88-
""" Helper function to build EMF object from a list of metrics, dimensions """
88+
"""Helper function to build EMF object from a list of metrics, dimensions"""
8989
my_metrics = MetricManager(namespace=namespace)
9090
for dimension in dimensions:
9191
my_metrics.add_dimension(**dimension)
@@ -102,7 +102,7 @@ def serialize_metrics(
102102

103103

104104
def serialize_single_metric(metric: Dict, dimension: Dict, namespace: str, metadata: Dict = None) -> Dict:
105-
""" Helper function to build EMF object from a given metric, dimension and namespace """
105+
"""Helper function to build EMF object from a given metric, dimension and namespace"""
106106
my_metrics = MetricManager(namespace=namespace)
107107
my_metrics.add_metric(**metric)
108108
my_metrics.add_dimension(**dimension)
@@ -114,7 +114,7 @@ def serialize_single_metric(metric: Dict, dimension: Dict, namespace: str, metad
114114

115115

116116
def remove_timestamp(metrics: List):
117-
""" Helper function to remove Timestamp key from EMF objects as they're built at serialization """
117+
"""Helper function to remove Timestamp key from EMF objects as they're built at serialization"""
118118
for metric in metrics:
119119
del metric["_aws"]["Timestamp"]
120120

0 commit comments

Comments
 (0)