From 0b7f90eeb6aa91e2263b64cedcce8f794a8b616e Mon Sep 17 00:00:00 2001 From: Shafqat Farhan Date: Wed, 18 Dec 2024 20:06:08 +0500 Subject: [PATCH] fix: linting errors --- commerce_coordinator/apps/commercetools/pipeline.py | 1 + commerce_coordinator/apps/commercetools/tests/conftest.py | 1 - .../apps/commercetools/tests/sub_messages/test_tasks.py | 7 ++++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/commerce_coordinator/apps/commercetools/pipeline.py b/commerce_coordinator/apps/commercetools/pipeline.py index 2759aa47c..e206b040f 100644 --- a/commerce_coordinator/apps/commercetools/pipeline.py +++ b/commerce_coordinator/apps/commercetools/pipeline.py @@ -330,6 +330,7 @@ def run_filter( ct_api_client = CommercetoolsAPIClient() try: + payment_on_order = None if payment_data is not None: payment_on_order = payment_data elif psp == EDX_STRIPE_PAYMENT_INTERFACE_NAME: diff --git a/commerce_coordinator/apps/commercetools/tests/conftest.py b/commerce_coordinator/apps/commercetools/tests/conftest.py index 7310ac493..61b7f6390 100644 --- a/commerce_coordinator/apps/commercetools/tests/conftest.py +++ b/commerce_coordinator/apps/commercetools/tests/conftest.py @@ -23,7 +23,6 @@ from commercetools.platform.models import Transaction as CTTransaction from commercetools.platform.models import TransactionState, TransactionType from commercetools.platform.models import TypeReference as CTTypeReference -from commercetools.platform.models import TypedMoney as CTTypedMoney from commercetools.platform.models.state import State as CTLineItemState from commercetools.platform.models.state import StateTypeEnum as CTStateType from commercetools.testing import BackendRepository diff --git a/commerce_coordinator/apps/commercetools/tests/sub_messages/test_tasks.py b/commerce_coordinator/apps/commercetools/tests/sub_messages/test_tasks.py index bd99fb6cd..f962e5cbb 100644 --- a/commerce_coordinator/apps/commercetools/tests/sub_messages/test_tasks.py +++ b/commerce_coordinator/apps/commercetools/tests/sub_messages/test_tasks.py @@ -274,7 +274,12 @@ def get_uut(): @patch('commerce_coordinator.apps.commercetools.sub_messages.tasks.is_edx_lms_order') @patch('commerce_coordinator.apps.stripe.pipeline.StripeAPIClient') @patch.object(CommercetoolsAPIClientMock, 'payment_mock', new_callable=MagicMock) - def test_correct_arguments_passed_already_refunded_doest_break(self, _stripe_api_mock, _lms_signal, custom_payment_mock): + def test_correct_arguments_passed_already_refunded_doest_break( + self, + _stripe_api_mock, + _lms_signal, + custom_payment_mock + ): """ Check calling uut with mock_parameters yields call to client with expected_data.