Skip to content

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

Fix codeclimate issues

Marcin Gębala36dd7a1cfb88
diff --git a/saleor/graphql/product/schema.py b/saleor/graphql/product/schema.py
index e3e6a3ce8b..85260ef736 100644
--- a/saleor/graphql/product/schema.py
+++ b/saleor/graphql/product/schema.py
@@ -1,6 +1,6 @@
+from textwrap import dedent
import graphene
from graphql_jwt.decorators import permission_required
-from textwrap import dedent
from ..core.fields import PrefetchingConnectionField
from ..core.types import ReportingPeriod
@@ -66,9 +66,12 @@ class ProductQueries(graphene.ObjectType):
collections=graphene.List(
graphene.ID, description='Filter products by collections.'),
price_lte=graphene.Float(
- description='Filter by price less than or equal to the given value.'),
+ description=dedent(
+ '''Filter by price less than or equal to the given value.''')),
price_gte=graphene.Float(
- description='Filter by price greater than or equal to the given value.'),
+ description=dedent(
+ '''
+ Filter by price greater than or equal to the given value.''')),
sort_by=graphene.Argument(
ProductOrder, description='Sort products.'),
stock_availability=graphene.Argument(
@@ -94,7 +97,8 @@ class ProductQueries(graphene.ObjectType):
description='List of top selling products.')
def resolve_attributes(
- self, info, in_category=None, in_collection=None, query=None, **kwargs):
+ self, info, in_category=None, in_collection=None, query=None,
+ **kwargs):
return resolve_attributes(info, in_category, in_collection, query)
def resolve_categories(self, info, level=None, query=None, **kwargs):
diff --git a/tests/api/test_attributes.py b/tests/api/test_attributes.py
index 04732767ad..b178bacfd6 100644
--- a/tests/api/test_attributes.py
+++ b/tests/api/test_attributes.py
@@ -2,12 +2,12 @@ import graphene
import pytest
from django.db.models import Q
from django.template.defaultfilters import slugify
+from tests.api.utils import get_graphql_content
from saleor.graphql.product.types import (
AttributeTypeEnum, AttributeValueType, resolve_attribute_value_type)
from saleor.graphql.product.utils import attributes_to_hstore
from saleor.product.models import Attribute, AttributeValue, Category
-from tests.api.utils import get_graphql_content
def test_attributes_to_hstore(product, color_attribute):