diff --git a/aws_lambda_powertools/logging/logger.py b/aws_lambda_powertools/logging/logger.py index d1cf9e35dfe..f1d4729c5d2 100644 --- a/aws_lambda_powertools/logging/logger.py +++ b/aws_lambda_powertools/logging/logger.py @@ -87,7 +87,7 @@ class Logger: service name to be appended in logs, by default "service_undefined" level : str, int optional The level to set. Can be a string representing the level name: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL' - or an integer representing the level value: 10 for 'DEBUG', 20 for 'INFO', 30 for 'WARNING', 40 for 'ERROR', 50 for 'CRITICAL'. # noqa: E501 + or an integer representing the level value: 10 for 'DEBUG', 20 for 'INFO', 30 for 'WARNING', 40 for 'ERROR', 50 for 'CRITICAL'. by default "INFO" child: bool, optional create a child Logger named ., False by default @@ -108,7 +108,7 @@ class Logger: Parameters propagated to LambdaPowertoolsFormatter -------------------------------------------------- datefmt: str, optional - String directives (strftime) to format log timestamp using `time`, by default it uses 2021-05-03 11:47:12,494+0200. # noqa: E501 + String directives (strftime) to format log timestamp using `time`, by default it uses 2021-05-03 11:47:12,494+0200. use_datetime_directive: bool, optional Interpret `datefmt` as a format string for `datetime.datetime.strftime`, rather than `time.strftime`. @@ -200,7 +200,7 @@ class Logger: ------ InvalidLoggerSamplingRateError When sampling rate provided is not a float - """ + """ # noqa: E501 def __init__( self, diff --git a/aws_lambda_powertools/metrics/base.py b/aws_lambda_powertools/metrics/base.py index 59daafa0bb1..11d2cbdc38a 100644 --- a/aws_lambda_powertools/metrics/base.py +++ b/aws_lambda_powertools/metrics/base.py @@ -576,7 +576,7 @@ def single_metric( from aws_lambda_powertools.metrics import MetricUnit from aws_lambda_powertools.metrics import MetricResolution - with single_metric(name="ColdStart", unit=MetricUnit.Count, value=1, resolution=MetricResolution.Standard, namespace="ServerlessAirline") as metric: # noqa E501 + with single_metric(name="ColdStart", unit=MetricUnit.Count, value=1, resolution=MetricResolution.Standard, namespace="ServerlessAirline") as metric: metric.add_dimension(name="function_version", value="47") **Same as above but set namespace using environment variable** @@ -587,7 +587,7 @@ def single_metric( from aws_lambda_powertools.metrics import MetricUnit from aws_lambda_powertools.metrics import MetricResolution - with single_metric(name="ColdStart", unit=MetricUnit.Count, value=1, resolution=MetricResolution.Standard) as metric: # noqa E501 + with single_metric(name="ColdStart", unit=MetricUnit.Count, value=1, resolution=MetricResolution.Standard) as metric: metric.add_dimension(name="function_version", value="47") Parameters @@ -618,7 +618,7 @@ def single_metric( When metric value isn't a number SchemaValidationError When metric object fails EMF schema validation - """ + """ # noqa: E501 metric_set: Optional[Dict] = None try: metric: SingleMetric = SingleMetric(namespace=namespace) diff --git a/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py b/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py index a609dee8214..7339ed33fce 100644 --- a/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py +++ b/aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py @@ -18,7 +18,7 @@ class TypeDeserializer: """ Deserializes DynamoDB types to Python types. - It's based on boto3's [DynamoDB TypeDeserializer](https://boto3.amazonaws.com/v1/documentation/api/latest/_modules/boto3/dynamodb/types.html). # noqa: E501 + It's based on boto3's [DynamoDB TypeDeserializer](https://boto3.amazonaws.com/v1/documentation/api/latest/_modules/boto3/dynamodb/types.html). The only notable difference is that for Binary (`B`, `BS`) values we return Python Bytes directly, since we don't support Python 2. diff --git a/aws_lambda_powertools/utilities/validation/validator.py b/aws_lambda_powertools/utilities/validation/validator.py index aab383eeb45..da459ea69cd 100644 --- a/aws_lambda_powertools/utilities/validation/validator.py +++ b/aws_lambda_powertools/utilities/validation/validator.py @@ -87,7 +87,7 @@ def handler(event, context): def handler(event, context): return event - **Unwrap, decode base64 and deserialize JSON string event before validating against actual payload - using built-in functions** # noqa: E501 + **Unwrap, decode base64 and deserialize JSON string event before validating against actual payload - using built-in functions** from aws_lambda_powertools.utilities.validation import validator @@ -95,7 +95,7 @@ def handler(event, context): def handler(event, context): return event - **Unwrap, decompress ZIP archive and deserialize JSON string event before validating against actual payload - using built-in functions** # noqa: E501 + **Unwrap, decompress ZIP archive and deserialize JSON string event before validating against actual payload - using built-in functions** from aws_lambda_powertools.utilities.validation import validator @@ -116,7 +116,7 @@ def handler(event, context): When JSON schema provided is invalid InvalidEnvelopeExpressionError When JMESPath expression to unwrap event is invalid - """ + """ # noqa: E501 if envelope: event = jmespath_utils.extract_data_from_envelope( data=event, envelope=envelope, jmespath_options=jmespath_options @@ -202,7 +202,7 @@ def handler(event, context): validate(event=event, schema=json_schema_dict, envelope="Records[*].kinesis.powertools_json(powertools_base64(data))") return event - **Unwrap, decompress ZIP archive and deserialize JSON string event before validating against actual payload - using built-in functions** # noqa: E501 + **Unwrap, decompress ZIP archive and deserialize JSON string event before validating against actual payload - using built-in functions** from aws_lambda_powertools.utilities.validation import validate @@ -218,7 +218,7 @@ def handler(event, context): When JSON schema provided is invalid InvalidEnvelopeExpressionError When JMESPath expression to unwrap event is invalid - """ + """ # noqa: E501 if envelope: event = jmespath_utils.extract_data_from_envelope( data=event, envelope=envelope, jmespath_options=jmespath_options diff --git a/ruff.toml b/ruff.toml index fa0fac405da..d72a89c026e 100644 --- a/ruff.toml +++ b/ruff.toml @@ -43,7 +43,6 @@ ignore = [ "PLC", # Convention category - disabled temporarily "PLE", # Error category - disabled temporarily "ISC", # flake8-implicit-str-concat - disabled temporarily - "E501", # Line too long - disabled temporarily "I001", # isort - disabled temporarily ]