Skip to content

Commit 318512d

Browse files
committed
MPT-16566 Fix ruff rules after dependabot bump
1 parent a28af32 commit 318512d

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.12.11
3+
rev: v0.14.10
44
hooks:
55
- id: ruff-check
66
- id: ruff-format

swo_aws_extension/flows/fulfillment/pipelines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def strip_trace_id(traceback_msg: str) -> str:
2525
# Should be removed with the new SDK error handling mechanism.
2626
def pipeline_error_handler(error: Exception, context: Context, next_step):
2727
"""Custom error handler for AWS pipelines."""
28-
logger.error("%s - Unexpected error in AWS pipeline: %s", context.order_id, str(error))
28+
logger.error("%s - Unexpected error in AWS pipeline: %s", context.order_id, error)
2929
traceback_id = strip_trace_id(traceback.format_exc())
3030
TeamsNotificationManager().notify_one_time_error(
3131
"Order fulfillment unhandled exception!",

swo_aws_extension/flows/steps/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ def __call__(
3333
self.pre_step(context)
3434
except ConfigurationStepError as error:
3535
logger.info(
36-
"%s - Stop - Stop step due to configuration error: %s", context.order_id, str(error)
36+
"%s - Stop - Stop step due to configuration error: %s",
37+
context.order_id,
38+
error,
3739
)
3840
return
3941

4042
try:
4143
self.process(context)
4244
except UnexpectedStopError as error:
43-
logger.info("%s - Unexpected Stop: %s", context.order_id, str(error))
45+
logger.info("%s - Unexpected Stop: %s", context.order_id, error)
4446
TeamsNotificationManager().notify_one_time_error(error.title, error.message)
4547
return
4648

tests/swo/mpt/sync/test_syncer.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,11 @@ def test_dry_run(self, mpt_client, caplog, agreement_factory, mock_update_agreem
418418

419419
assert caplog.messages == [
420420
"AGR-2119-4550-8674-5962 - synchronizing responsibility transfer ID: PMA-123456",
421-
"AGR-2119-4550-8674-5962 - dry run mode - skipping update with parameters: "
422-
"{'fulfillment': [{'externalId': 'responsibilityTransferId', 'value': "
423-
"'PMA-123456'}]}",
421+
(
422+
"AGR-2119-4550-8674-5962 - dry run mode - skipping update with parameters: "
423+
"{'fulfillment': [{'externalId': 'responsibilityTransferId', 'value': "
424+
"'PMA-123456'}]}"
425+
),
424426
]
425427
mock_update_agreement.assert_not_called()
426428

0 commit comments

Comments
 (0)