Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Resort imports by upgraded isort
Unknown0ab4201f9691
diff --git a/saleor/account/backends/facebook.py b/saleor/account/backends/facebook.pyindex b372ac016e..408c0744c7 100644--- a/saleor/account/backends/facebook.py+++ b/saleor/account/backends/facebook.py@@ -1,7 +1,7 @@from social_core.backends.facebook import FacebookOAuth2-from . import BaseBackendfrom ...site import AuthenticationBackends+from . import BaseBackendclass CustomFacebookOAuth2(BaseBackend, FacebookOAuth2):diff --git a/saleor/account/backends/google.py b/saleor/account/backends/google.pyindex 6c8e205b95..4c83a52687 100644--- a/saleor/account/backends/google.py+++ b/saleor/account/backends/google.py@@ -1,7 +1,7 @@from social_core.backends.google import GoogleOAuth2-from . import BaseBackendfrom ...site import AuthenticationBackends+from . import BaseBackendclass CustomGoogleOAuth2(BaseBackend, GoogleOAuth2):diff --git a/saleor/account/forms.py b/saleor/account/forms.pyindex efe4c5a00c..1f77783a76 100644--- a/saleor/account/forms.py+++ b/saleor/account/forms.py@@ -5,8 +5,8 @@ from django.contrib.auth import forms as django_forms, update_session_auth_hashfrom django.utils.translation import pgettext, pgettext_lazyfrom phonenumbers.phonenumberutil import country_code_for_region-from . import emailsfrom ..account.models import User+from . import emailsfrom .i18n import AddressMetaForm, get_address_form_classdiff --git a/saleor/checkout/utils.py b/saleor/checkout/utils.pyindex e2b04da2fa..fa9161738e 100644--- a/saleor/checkout/utils.py+++ b/saleor/checkout/utils.py@@ -11,7 +11,6 @@ from django.utils.encoding import smart_textfrom django.utils.translation import get_language, pgettext, pgettext_lazyfrom prices import TaxedMoneyRange-from . import AddressType, loggerfrom ..account.forms import get_address_formfrom ..account.models import Address, Userfrom ..account.utils import store_user_address@@ -25,6 +24,7 @@ from ..discount.utils import (get_value_voucher_discount, increase_voucher_usage)from ..order.models import Orderfrom ..shipping.models import ShippingMethod+from . import AddressType, loggerfrom .forms import (AddressChoiceForm, AnonymousUserBillingForm, AnonymousUserShippingForm,BillingAddressChoiceForm)diff --git a/saleor/core/middleware.py b/saleor/core/middleware.pyindex e97cf35f5b..e2b69c8823 100644--- a/saleor/core/middleware.py+++ b/saleor/core/middleware.py@@ -7,8 +7,8 @@ from django.utils.functional import SimpleLazyObjectfrom django.utils.translation import get_languagefrom django_countries.fields import Country-from . import analyticsfrom ..discount.models import Sale+from . import analyticsfrom .utils import get_client_ip, get_country_by_ip, get_currency_for_countryfrom .utils.taxes import get_taxes_for_countrydiff --git a/saleor/dashboard/discount/views.py b/saleor/dashboard/discount/views.pyindex 3e2bcadde5..678c208c53 100644--- a/saleor/dashboard/discount/views.py+++ b/saleor/dashboard/discount/views.py@@ -9,11 +9,11 @@ from django.shortcuts import get_object_or_404, redirectfrom django.template.response import TemplateResponsefrom django.utils.translation import pgettext_lazy-from . import formsfrom ...core.utils import get_paginator_itemsfrom ...discount import VoucherTypefrom ...discount.models import Sale, Voucherfrom ..views import staff_member_required+from . import formsfrom .filters import SaleFilter, VoucherFilterdiff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.pyindex 701828b352..d3fc430dbc 100644--- a/saleor/dashboard/product/forms.py+++ b/saleor/dashboard/product/forms.py@@ -10,7 +10,6 @@ from django.utils.translation import pgettext_lazyfrom django_prices_vatlayer.utils import get_tax_rate_typesfrom mptt.forms import TreeNodeChoiceField-from . import ProductBulkActionfrom ...core import TaxRateTypefrom ...core.utils.taxes import DEFAULT_TAX_RATE_NAME, include_taxes_in_pricesfrom ...core.weight import WeightField@@ -24,6 +23,7 @@ from ..forms import ModelChoiceOrCreationField, OrderedModelMultipleChoiceFieldfrom ..seo.fields import SeoDescriptionField, SeoTitleFieldfrom ..seo.utils import prepare_seo_descriptionfrom ..widgets import RichTextEditorWidget+from . import ProductBulkActionfrom .widgets import ImagePreviewWidgetdiff --git a/saleor/dashboard/product/views.py b/saleor/dashboard/product/views.pyindex 068c8f59ef..6cdf372964 100644--- a/saleor/dashboard/product/views.py+++ b/saleor/dashboard/product/views.py@@ -10,7 +10,6 @@ from django.template.response import TemplateResponsefrom django.utils.translation import npgettext_lazy, pgettext_lazyfrom django.views.decorators.http import require_POST-from . import formsfrom ...core.utils import get_paginator_itemsfrom ...discount.models import Salefrom ...product.models import (@@ -20,6 +19,7 @@ from ...product.utils.availability import get_availabilityfrom ...product.utils.costs import (get_margin_for_variant, get_product_costs_data)from ..views import staff_member_required+from . import formsfrom .filters import AttributeFilter, ProductFilter, ProductTypeFilterdiff --git a/saleor/discount/models.py b/saleor/discount/models.pyindex 7e8f5e7fcf..84b0ee67d2 100644--- a/saleor/discount/models.py+++ b/saleor/discount/models.py@@ -11,8 +11,8 @@ from django_prices.models import MoneyFieldfrom django_prices.templatetags.prices_i18n import amountfrom prices import Money, fixed_discount, percentage_discount-from . import DiscountValueType, VoucherTypefrom ..core.utils.translations import TranslationProxy+from . import DiscountValueType, VoucherTypeclass NotApplicable(ValueError):diff --git a/saleor/order/models.py b/saleor/order/models.pyindex b6357a5a66..4b4ceb853a 100644--- a/saleor/order/models.py+++ b/saleor/order/models.py@@ -15,7 +15,6 @@ from django_prices.models import MoneyField, TaxedMoneyFieldfrom measurement.measures import Weightfrom prices import Money-from . import FulfillmentStatus, OrderEvents, OrderStatus, display_order_eventfrom ..account.models import Addressfrom ..core.utils.json_serializer import CustomJsonEncoderfrom ..core.utils.taxes import ZERO_TAXED_MONEY, zero_money@@ -23,6 +22,7 @@ from ..core.weight import WeightUnits, zero_weightfrom ..discount.models import Voucherfrom ..payment import ChargeStatus, TransactionKindfrom ..shipping.models import ShippingMethod+from . import FulfillmentStatus, OrderEvents, OrderStatus, display_order_eventclass OrderQueryset(models.QuerySet):diff --git a/saleor/order/urls.py b/saleor/order/urls.pyindex 5caa92caff..107bd423c5 100644--- a/saleor/order/urls.py+++ b/saleor/order/urls.py@@ -1,7 +1,7 @@from django.conf.urls import url-from . import viewsfrom ..core import TOKEN_PATTERN+from . import viewsurlpatterns = [url(r'^%s/$' % (TOKEN_PATTERN,), views.details, name='details'),diff --git a/saleor/order/views.py b/saleor/order/views.pyindex cd643bfd69..5dc25b5b62 100644--- a/saleor/order/views.py+++ b/saleor/order/views.py@@ -10,13 +10,13 @@ from django.urls import reversefrom django.utils.translation import pgettext_lazyfrom django.views.decorators.csrf import csrf_exempt-from . import FulfillmentStatusfrom ..account.forms import LoginFormfrom ..account.models import Userfrom ..core.utils import get_client_ipfrom ..payment import ChargeStatus, TransactionKind, get_payment_gatewayfrom ..payment.utils import (create_payment, create_payment_information, gateway_process_payment)+from . import FulfillmentStatusfrom .forms import (CustomerNoteForm, PasswordForm, PaymentDeleteForm, PaymentsForm)from .models import Orderdiff --git a/saleor/payment/models.py b/saleor/payment/models.pyindex 59f09c07ec..a9bcd83863 100644--- a/saleor/payment/models.py+++ b/saleor/payment/models.py@@ -8,11 +8,11 @@ from django.core.validators import MaxValueValidator, MinValueValidatorfrom django.db import modelsfrom prices import Money-from . import (- ChargeStatus, CustomPaymentChoices, TransactionError, TransactionKind)from ..checkout.models import Cartfrom ..core.utils.taxes import zero_moneyfrom ..order.models import Order+from . import (+ ChargeStatus, CustomPaymentChoices, TransactionError, TransactionKind)class Payment(models.Model):diff --git a/saleor/payment/utils.py b/saleor/payment/utils.pyindex 49837c8fe9..d10d048c5d 100644--- a/saleor/payment/utils.py+++ b/saleor/payment/utils.py@@ -9,15 +9,15 @@ 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, Userfrom ..checkout.models import Cartfrom ..core import analyticsfrom ..order import OrderEvents, OrderEventsEmailsfrom ..order.emails import send_payment_confirmationfrom ..order.models import Order+from . import (+ ChargeStatus, CustomPaymentChoices, GatewayError, OperationType,+ PaymentError, TransactionKind, get_payment_gateway)from .models import Payment, Transactionlogger = logging.getLogger(__name__)diff --git a/saleor/product/utils/availability.py b/saleor/product/utils/availability.pyindex 0aef3122e9..be9957f67e 100644--- a/saleor/product/utils/availability.py+++ b/saleor/product/utils/availability.py@@ -1,7 +1,7 @@from collections import namedtuple-from .. import ProductAvailabilityStatus, VariantAvailabilityStatusfrom ...core.utils import to_local_currency+from .. import ProductAvailabilityStatus, VariantAvailabilityStatusProductAvailability = namedtuple('ProductAvailability', (diff --git a/saleor/shipping/models.py b/saleor/shipping/models.pyindex cd5e2a7722..a0024e9c14 100644--- a/saleor/shipping/models.py+++ b/saleor/shipping/models.py@@ -8,11 +8,11 @@ from django_prices.models import MoneyFieldfrom measurement.measures import Weightfrom prices import MoneyRange-from . import ShippingMethodTypefrom ..core.utils import format_moneyfrom ..core.utils.taxes import get_taxed_shipping_pricefrom ..core.utils.translations import TranslationProxyfrom ..core.weight import WeightUnits, zero_weight+from . import ShippingMethodTypefrom .utils import (applicable_price_based_methods, applicable_weight_based_methods,get_price_type_display, get_weight_type_display)diff --git a/saleor/site/models.py b/saleor/site/models.pyindex b3998fb157..e66e4c25d2 100644--- a/saleor/site/models.py+++ b/saleor/site/models.py@@ -2,9 +2,9 @@ from django.contrib.sites.models import Sitefrom django.db import modelsfrom django.utils.translation import pgettext_lazy-from . import AuthenticationBackendsfrom ..core.utils.translations import TranslationProxyfrom ..core.weight import WeightUnits+from . import AuthenticationBackendsfrom .patch_sites import patch_contrib_sitespatch_contrib_sites()