Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Apply textwrap.decent to GraphQL descriptions after rebase
fowczarek0a48bd3bc3f8
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.pyindex 780a4f2f85..3dda427e7c 100644--- a/saleor/graphql/api.py+++ b/saleor/graphql/api.py@@ -1,6 +1,7 @@import grapheneimport graphql_jwtfrom graphql_jwt.decorators import login_required, permission_required+from textwrap import dedentfrom .account.mutations import (CustomerCreate, CustomerDelete, CustomerUpdate, CustomerPasswordReset,@@ -87,8 +88,8 @@ class Query(ProductQueries):OrderStatusFilter, description='Filter order by status'),description='List of the shop\'s orders.')homepage_events = PrefetchingConnectionField(- OrderEvent, description='''List of activity events to display on- homepage (at the moment it only contains order-events).''')+ OrderEvent, description=dedent('''List of activity events to display on+ homepage (at the moment it only contains order-events).'''))page = graphene.Field(Page, id=graphene.Argument(graphene.ID), slug=graphene.String(),description='Lookup a page by ID or by slug.')diff --git a/saleor/graphql/menu/types.py b/saleor/graphql/menu/types.pyindex ee01b44371..9d4a8c5ba6 100644--- a/saleor/graphql/menu/types.py+++ b/saleor/graphql/menu/types.py@@ -24,13 +24,8 @@ class Menu(CountableDjangoObjectType):prefetch_related=prefetch_menus)class Meta:-<<<<<<< HEAD- description = """Represents a single menu - an object that is used- to help navigate through the store."""-=======- description = dedent("""Represents a single item of the related menu.- Can store categories, collection or pages.""")->>>>>>> Apply textwrap.decent to GraphQL descriptions+ description = dedent("""Represents a single menu - an object that is used+ to help navigate through the store.""")interfaces = [relay.Node]exclude_fields = ['json_content']model = models.Menu@@ -47,13 +42,8 @@ class MenuItem(CountableDjangoObjectType):url = graphene.String(description='URL to the menu item.')class Meta:-<<<<<<< HEAD- description = """Represents a single item of the related menu.- Can store categories, collection or pages."""-=======- description = dedent("""Represents a single menu - an object that is- used to help navigate through the store.""")->>>>>>> Apply textwrap.decent to GraphQL descriptions+ description = dedent("""Represents a single item of the related menu.+ Can store categories, collection or pages.""")interfaces = [relay.Node]exclude_fields = ['sort_order', 'lft', 'rght', 'tree_id']model = models.MenuItemdiff --git a/saleor/graphql/product/mutations/products.py b/saleor/graphql/product/mutations/products.pyindex e3ae25033b..e4ee416829 100644--- a/saleor/graphql/product/mutations/products.py+++ b/saleor/graphql/product/mutations/products.py@@ -29,9 +29,9 @@ class CategoryCreate(ModelMutation):input = CategoryInput(required=True, description='Fields required to create a category.')parent_id = graphene.ID(- description='''+ description=dedent('''ID of the parent category. If empty, category will be top level- category.''', name='parent')+ category.'''), name='parent')class Meta:description = 'Creates a new category.'diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.pyindex c89394b3d7..6f70fdf9ba 100644--- a/saleor/graphql/product/types.py+++ b/saleor/graphql/product/types.py@@ -143,9 +143,10 @@ class ProductVariant(CountableDjangoObjectType):quantity_ordered = graphene.Int(description='Total quantity ordered.')revenue = graphene.Field(TaxedMoney, period=graphene.Argument(ReportingPeriod),- description='''Total revenue generated by a variant in given period of- time. Note: this field should be queried using `reportProductSales`- query as it uses optimizations suitable for such calculations.''')+ description=dedent('''Total revenue generated by a variant in given+ period of time. Note: this field should be queried using+ `reportProductSales` query as it uses optimizations suitable+ for such calculations.'''))class Meta:description = dedent("""Represents a version of a product such as