Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix import order

fowczarekfe4c82157b8e
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.py
index 3dda427e7c..36b949b8e7 100644
--- a/saleor/graphql/api.py
+++ b/saleor/graphql/api.py
@@ -1,7 +1,8 @@
+from textwrap import dedent
+
import graphene
import graphql_jwt
from graphql_jwt.decorators import login_required, permission_required
-from textwrap import dedent
from .account.mutations import (
CustomerCreate, CustomerDelete, CustomerUpdate, CustomerPasswordReset,
diff --git a/saleor/graphql/core/mutations.py b/saleor/graphql/core/mutations.py
index 559ef7391c..31f956a7bf 100644
--- a/saleor/graphql/core/mutations.py
+++ b/saleor/graphql/core/mutations.py
@@ -1,4 +1,5 @@
from itertools import chain
+from textwrap import dedent
import graphene
from django.core.exceptions import ImproperlyConfigured, ValidationError
@@ -7,7 +8,6 @@ from graphene_django.registry import get_global_registry
from graphql.error import GraphQLError
from graphql_jwt import ObtainJSONWebToken, Verify
from graphql_jwt.exceptions import JSONWebTokenError, PermissionDenied
-from textwrap import dedent
from ...account import models
from ..account.types import User
diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py
index 0dad146523..02442d4806 100644
--- a/saleor/graphql/core/types/common.py
+++ b/saleor/graphql/core/types/common.py
@@ -1,10 +1,10 @@
import decimal
+from textwrap import dedent
import graphene
from graphene_django import DjangoObjectType
from saleor.core.permissions import MODELS_PERMISSIONS
from saleor.graphql.core.utils import str_to_enum
-from textwrap import dedent
from ....core import weight
from ..connection import CountableConnection
diff --git a/saleor/graphql/core/types/money.py b/saleor/graphql/core/types/money.py
index c92c101c03..2a99bfc8b6 100644
--- a/saleor/graphql/core/types/money.py
+++ b/saleor/graphql/core/types/money.py
@@ -1,6 +1,7 @@
+from textwrap import dedent
+
import graphene
from django_prices.templatetags import prices_i18n
-from textwrap import dedent
from ....core import TaxRateType as TaxRates
from ..utils import str_to_enum
diff --git a/saleor/graphql/discount/types.py b/saleor/graphql/discount/types.py
index c18d27e779..3c34fc477e 100644
--- a/saleor/graphql/discount/types.py
+++ b/saleor/graphql/discount/types.py
@@ -1,7 +1,8 @@
+from textwrap import dedent
+
import graphene
import graphene_django_optimizer as gql_optimizer
from graphene import relay
-from textwrap import dedent
from ..core.fields import PrefetchingConnectionField
from ...discount import DiscountValueType, VoucherType, models
diff --git a/saleor/graphql/file_upload/types.py b/saleor/graphql/file_upload/types.py
index d809afb682..95aebd3140 100644
--- a/saleor/graphql/file_upload/types.py
+++ b/saleor/graphql/file_upload/types.py
@@ -1,6 +1,7 @@
-import graphene
from textwrap import dedent
+import graphene
+
class Upload(graphene.types.Scalar):
diff --git a/saleor/graphql/menu/types.py b/saleor/graphql/menu/types.py
index 9d4a8c5ba6..7cd1fb69f0 100644
--- a/saleor/graphql/menu/types.py
+++ b/saleor/graphql/menu/types.py
@@ -1,8 +1,9 @@
+from textwrap import dedent
+
import graphene
import graphene_django_optimizer as gql_optimizer
from django.db.models import Prefetch
from graphene import relay
-from textwrap import dedent
from ...menu import models
from ..core.types.common import CountableDjangoObjectType
diff --git a/saleor/graphql/order/mutations/draft_orders.py b/saleor/graphql/order/mutations/draft_orders.py
index 602960eb21..d401943aa4 100644
--- a/saleor/graphql/order/mutations/draft_orders.py
+++ b/saleor/graphql/order/mutations/draft_orders.py
@@ -1,7 +1,8 @@
+from textwrap import dedent
+
import graphene
from graphene.types import InputObjectType
from graphql_jwt.decorators import permission_required
-from textwrap import dedent
from ....account.models import Address, User
from ....core.exceptions import InsufficientStock
diff --git a/saleor/graphql/order/mutations/fulfillments.py b/saleor/graphql/order/mutations/fulfillments.py
index 91d153697e..6d3bd93b24 100644
--- a/saleor/graphql/order/mutations/fulfillments.py
+++ b/saleor/graphql/order/mutations/fulfillments.py
@@ -1,7 +1,8 @@
+from textwrap import dedent
+
import graphene
from django.utils.translation import npgettext_lazy, pgettext_lazy
from graphql_jwt.decorators import permission_required
-from textwrap import dedent
from ....dashboard.order.utils import fulfill_order_line
from ....order import OrderEvents, OrderEventsEmails, models
diff --git a/saleor/graphql/page/mutations.py b/saleor/graphql/page/mutations.py
index 58c70a917d..3b9fa158a3 100644
--- a/saleor/graphql/page/mutations.py
+++ b/saleor/graphql/page/mutations.py
@@ -1,6 +1,7 @@
+from textwrap import dedent
+
import graphene
from django.utils.text import slugify
-from textwrap import dedent
from ...page import models
from ..core.mutations import ModelDeleteMutation, ModelMutation
diff --git a/saleor/graphql/page/types.py b/saleor/graphql/page/types.py
index ed46c73214..ae62ceb934 100644
--- a/saleor/graphql/page/types.py
+++ b/saleor/graphql/page/types.py
@@ -1,6 +1,7 @@
-from graphene import relay
from textwrap import dedent
+from graphene import relay
+
from ...page import models
from ..core.types.common import CountableDjangoObjectType
diff --git a/saleor/graphql/product/mutations/products.py b/saleor/graphql/product/mutations/products.py
index e4ee416829..d9d200bdb0 100644
--- a/saleor/graphql/product/mutations/products.py
+++ b/saleor/graphql/product/mutations/products.py
@@ -1,8 +1,9 @@
+from textwrap import dedent
+
import graphene
from django.template.defaultfilters import slugify
from graphene.types import InputObjectType
from graphql_jwt.decorators import permission_required
-from textwrap import dedent
from ....product import models
from ....product.utils.attributes import get_name_from_attributes
diff --git a/saleor/graphql/shipping/mutations.py b/saleor/graphql/shipping/mutations.py
index 275349e692..53cc78fb6b 100644
--- a/saleor/graphql/shipping/mutations.py
+++ b/saleor/graphql/shipping/mutations.py
@@ -1,6 +1,7 @@
-import graphene
from textwrap import dedent
+import graphene
+
from ...dashboard.shipping.forms import default_shipping_zone_exists
from ...shipping import models
from ..core.mutations import ModelDeleteMutation, ModelMutation
diff --git a/saleor/graphql/shipping/types.py b/saleor/graphql/shipping/types.py
index a08acfce1e..26b6dec116 100644
--- a/saleor/graphql/shipping/types.py
+++ b/saleor/graphql/shipping/types.py
@@ -1,11 +1,11 @@
import decimal
+from textwrap import dedent
import graphene
import graphene_django_optimizer as gql_optimizer
from graphene import relay
from graphene.types import Scalar
from measurement.measures import Weight
-from textwrap import dedent
from ...core.weight import convert_weight, get_default_weight_unit
from ...shipping import ShippingMethodType, models