Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix codeclimate issues
Marcin Gębala36dd7a1cfb88
diff --git a/saleor/graphql/product/schema.py b/saleor/graphql/product/schema.pyindex e3e6a3ce8b..85260ef736 100644--- a/saleor/graphql/product/schema.py+++ b/saleor/graphql/product/schema.py@@ -1,6 +1,6 @@+from textwrap import dedentimport graphenefrom graphql_jwt.decorators import permission_required-from textwrap import dedentfrom ..core.fields import PrefetchingConnectionFieldfrom ..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.pyindex 04732767ad..b178bacfd6 100644--- a/tests/api/test_attributes.py+++ b/tests/api/test_attributes.py@@ -2,12 +2,12 @@ import grapheneimport pytestfrom django.db.models import Qfrom django.template.defaultfilters import slugify+from tests.api.utils import get_graphql_contentfrom saleor.graphql.product.types import (AttributeTypeEnum, AttributeValueType, resolve_attribute_value_type)from saleor.graphql.product.utils import attributes_to_hstorefrom saleor.product.models import Attribute, AttributeValue, Category-from tests.api.utils import get_graphql_contentdef test_attributes_to_hstore(product, color_attribute):