Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix code styling issues
Marcin Gębala179286469af2
diff --git a/saleor/checkout/models.py b/saleor/checkout/models.pyindex e47bbebd16..c39b7ab5f8 100644--- a/saleor/checkout/models.py+++ b/saleor/checkout/models.py@@ -1,7 +1,6 @@"""Cart-related ORM models."""-from operator import attrgetter-from decimal import Decimal+from operator import attrgetterfrom uuid import uuid4from django.conf import settingsdiff --git a/saleor/graphql/payment/mutations.py b/saleor/graphql/payment/mutations.pyindex 35aa426fd7..e554c3b8fe 100644--- a/saleor/graphql/payment/mutations.py+++ b/saleor/graphql/payment/mutations.py@@ -6,8 +6,7 @@ from ...core.utils import get_client_ipfrom ...core.utils.taxes import get_taxes_for_addressfrom ...payment import PaymentErrorfrom ...payment.utils import (- create_payment, gateway_authorize, gateway_capture, gateway_charge,- gateway_refund, gateway_void)+ create_payment, gateway_capture, gateway_refund, gateway_void)from ..account.i18n import I18nMixinfrom ..account.types import AddressInputfrom ..checkout.types import Checkoutdiff --git a/saleor/payment/utils.py b/saleor/payment/utils.pyindex 25fb98f8bd..7a4d39eeaf 100644--- a/saleor/payment/utils.py+++ b/saleor/payment/utils.py@@ -9,17 +9,16 @@ from django.core.serializers.json import DjangoJSONEncoderfrom django.db import transactionfrom django.utils.translation import pgettext_lazy+from . import (+ ChargeStatus, CustomPaymentChoices, GatewayError, OperationType,+ PaymentError, TransactionKind, get_payment_gateway)from ..account.models import Address, User-from ..core import analyticsfrom ..checkout.models import Cart+from ..core import analyticsfrom ..order import OrderEvents, OrderEventsEmailsfrom ..order.emails import send_payment_confirmationfrom ..order.models import Orderfrom .models import Payment, Transaction-from . import (- CustomPaymentChoices, ChargeStatus, GatewayError, OperationType,- PaymentError, TransactionKind, get_payment_gateway)-logger = logging.getLogger(__name__)@@ -99,14 +98,16 @@ def validate_payment(view):def create_payment(- gateway: str, total: Decimal,- currency: str, email: str, billing_address: Address,+ gateway: str,+ total: Decimal,+ currency: str,+ email: str,+ billing_address: Address,customer_ip_address: str = '',payment_token: str = '',extra_data: Dict = None,checkout: Cart = None,- order: Order = None- ) -> Payment:+ order: Order = None) -> Payment:"""Create a payment instance.This method is responsible for creating payment instances that works for