Skip to content

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

Fix descriptions

Marcin Gębala44792fd6df1f
diff --git a/saleor/graphql/account/mutations/account.py b/saleor/graphql/account/mutations/account.py
index a46192a123..c42609e638 100644
--- a/saleor/graphql/account/mutations/account.py
+++ b/saleor/graphql/account/mutations/account.py
@@ -20,7 +20,7 @@ from .base import (
class AccountRegisterInput(graphene.InputObjectType):
email = graphene.String(description="The email address of the user.", required=True)
- password = graphene.String(description="Password", required=True)
+ password = graphene.String(description="Password.", required=True)
class AccountRegister(ModelMutation):
@@ -167,7 +167,7 @@ class AccountAddressCreate(ModelMutation):
class Arguments:
input = AddressInput(
- description="Fields required to create address", required=True
+ description="Fields required to create address.", required=True
)
type = AddressTypeEnum(
required=False,
diff --git a/saleor/graphql/account/mutations/base.py b/saleor/graphql/account/mutations/base.py
index 3e3308ff7e..4d0ebf770d 100644
--- a/saleor/graphql/account/mutations/base.py
+++ b/saleor/graphql/account/mutations/base.py
@@ -197,9 +197,9 @@ class BaseAddressUpdate(ModelMutation):
)
class Arguments:
- id = graphene.ID(description="ID of the address to update", required=True)
+ id = graphene.ID(description="ID of the address to update.", required=True)
input = AddressInput(
- description="Fields required to update the address", required=True
+ description="Fields required to update the address.", required=True
)
class Meta:
@@ -297,7 +297,7 @@ class CustomerInput(UserInput, UserAddressInput):
class UserCreateInput(CustomerInput):
send_password_email = graphene.Boolean(
- description="Send an email with a link to set a password"
+ description="Send an email with a link to set a password."
)
redirect_url = graphene.String(
description=(
@@ -389,7 +389,7 @@ class UserUpdateMeta(UpdateMetaBaseMutation):
class UserClearMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clear stored metadata value."
+ description = "Clear metadata for user."
model = models.User
public = True
error_type_class = AccountError
diff --git a/saleor/graphql/account/mutations/deprecated_account.py b/saleor/graphql/account/mutations/deprecated_account.py
index 56e1b81f62..0e5dd2854b 100644
--- a/saleor/graphql/account/mutations/deprecated_account.py
+++ b/saleor/graphql/account/mutations/deprecated_account.py
@@ -15,7 +15,7 @@ class CustomerRegisterInput(graphene.InputObjectType):
email = graphene.String(
description="The unique email address of the user.", required=True
)
- password = graphene.String(description="Password", required=True)
+ password = graphene.String(description="Password.", required=True)
class CustomerRegister(ModelMutation):
@@ -73,7 +73,7 @@ class CustomerAddressCreate(ModelMutation):
class Arguments:
input = AddressInput(
- description="Fields required to create address", required=True
+ description="Fields required to create address.", required=True
)
type = AddressTypeEnum(
required=False,
@@ -167,7 +167,7 @@ class CustomerPasswordResetInput(graphene.InputObjectType):
class CustomerPasswordReset(BaseMutation):
class Arguments:
input = CustomerPasswordResetInput(
- description="Fields required to reset customer's password", required=True
+ description="Fields required to reset customer's password.", required=True
)
class Meta:
diff --git a/saleor/graphql/account/mutations/deprecated_staff.py b/saleor/graphql/account/mutations/deprecated_staff.py
index 8c916877a9..67796d298e 100644
--- a/saleor/graphql/account/mutations/deprecated_staff.py
+++ b/saleor/graphql/account/mutations/deprecated_staff.py
@@ -24,7 +24,7 @@ def send_user_password_reset_email(user, site):
class PasswordReset(BaseMutation):
class Arguments:
- email = graphene.String(description="Email", required=True)
+ email = graphene.String(description="Email.", required=True)
class Meta:
description = (
diff --git a/saleor/graphql/account/mutations/service_account.py b/saleor/graphql/account/mutations/service_account.py
index 07db65ba7e..3d9da17f8a 100644
--- a/saleor/graphql/account/mutations/service_account.py
+++ b/saleor/graphql/account/mutations/service_account.py
@@ -84,7 +84,7 @@ class ServiceAccountCreate(ModelMutation):
)
class Meta:
- description = "Creates a new service account"
+ description = "Creates a new service account."
model = models.ServiceAccount
permissions = ("account.manage_service_accounts",)
error_type_class = AccountError
@@ -122,7 +122,7 @@ class ServiceAccountUpdate(ModelMutation):
)
class Meta:
- description = "Updates an existing service account"
+ description = "Updates an existing service account."
model = models.ServiceAccount
permissions = ("account.manage_service_accounts",)
error_type_class = AccountError
@@ -144,7 +144,7 @@ class ServiceAccountDelete(ModelDeleteMutation):
)
class Meta:
- description = "Deletes a service account"
+ description = "Deletes a service account."
model = models.ServiceAccount
permissions = ("account.manage_service_accounts",)
error_type_class = AccountError
@@ -163,7 +163,7 @@ class ServiceAccountUpdatePrivateMeta(UpdateMetaBaseMutation):
class ServiceAccountClearPrivateMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clear stored metadata value."
+ description = "Clear private metadata for a service account."
model = models.ServiceAccount
permissions = ("account.manage_service_accounts",)
public = False
diff --git a/saleor/graphql/account/mutations/staff.py b/saleor/graphql/account/mutations/staff.py
index 9ed270c6ee..7bed53b473 100644
--- a/saleor/graphql/account/mutations/staff.py
+++ b/saleor/graphql/account/mutations/staff.py
@@ -46,7 +46,7 @@ class StaffInput(UserInput):
class StaffCreateInput(StaffInput):
send_password_email = graphene.Boolean(
- description="Send an email with a link to set the password"
+ description="Send an email with a link to set the password."
)
redirect_url = graphene.String(
description=(
@@ -288,14 +288,14 @@ class AddressCreate(ModelMutation):
class Arguments:
user_id = graphene.ID(
- description="ID of a user to create address for", required=True
+ description="ID of a user to create address for.", required=True
)
input = AddressInput(
- description="Fields required to create address", required=True
+ description="Fields required to create address.", required=True
)
class Meta:
- description = "Creates user address"
+ description = "Creates user address."
model = models.Address
permissions = ("account.manage_users",)
error_type_class = AccountError
@@ -314,7 +314,7 @@ class AddressCreate(ModelMutation):
class AddressUpdate(BaseAddressUpdate):
class Meta:
- description = "Updates an address"
+ description = "Updates an address."
model = models.Address
permissions = ("account.manage_users",)
error_type_class = AccountError
@@ -323,7 +323,7 @@ class AddressUpdate(BaseAddressUpdate):
class AddressDelete(BaseAddressDelete):
class Meta:
- description = "Deletes an address"
+ description = "Deletes an address."
model = models.Address
permissions = ("account.manage_users",)
error_type_class = AccountError
@@ -437,7 +437,7 @@ class UserUpdatePrivateMeta(UpdateMetaBaseMutation):
class UserClearPrivateMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clear stored metadata value."
+ description = "Clear private metadata for user."
model = models.User
permissions = ("account.manage_users",)
public = False
diff --git a/saleor/graphql/account/schema.py b/saleor/graphql/account/schema.py
index 7b45f2b141..1cc303c015 100644
--- a/saleor/graphql/account/schema.py
+++ b/saleor/graphql/account/schema.py
@@ -117,20 +117,20 @@ class AccountQueries(graphene.ObjectType):
filter=ServiceAccountFilterInput(
description="Filtering options for service accounts."
),
- description="List of the service accounts",
+ description="List of the service accounts.",
)
service_account = graphene.Field(
ServiceAccount,
id=graphene.Argument(
graphene.ID, description="ID of the service account.", required=True
),
- description="Lookup a service account by ID.",
+ description="Look up a service account by ID.",
)
user = graphene.Field(
User,
id=graphene.Argument(graphene.ID, description="ID of the user.", required=True),
- description="Lookup a user by ID.",
+ description="Look up a user by ID.",
)
def resolve_address_validation_rules(
diff --git a/saleor/graphql/account/types.py b/saleor/graphql/account/types.py
index 35cfe84665..f9145c90ab 100644
--- a/saleor/graphql/account/types.py
+++ b/saleor/graphql/account/types.py
@@ -35,13 +35,13 @@ class AddressInput(graphene.InputObjectType):
class Address(CountableDjangoObjectType):
country = graphene.Field(
- CountryDisplay, required=True, description="Default shop's country"
+ CountryDisplay, required=True, description="Shop's default country."
)
is_default_shipping_address = graphene.Boolean(
- required=False, description="Address is user's default shipping address"
+ required=False, description="Address is user's default shipping address."
)
is_default_billing_address = graphene.Boolean(
- required=False, description="Address is user's default billing address"
+ required=False, description="Address is user's default billing address."
)
class Meta:
@@ -110,7 +110,7 @@ class CustomerEvent(CountableDjangoObjectType):
date = graphene.types.datetime.DateTime(
description="Date when event happened at in ISO 8601 format."
)
- type = CustomerEventsEnum(description="Customer event type")
+ type = CustomerEventsEnum(description="Customer event type.")
user = graphene.Field(
lambda: User,
id=graphene.Argument(graphene.ID),
@@ -183,7 +183,7 @@ class ServiceAccount(MetadataObjectType, CountableDjangoObjectType):
name = graphene.String(description="Name of the service account.")
tokens = graphene.List(
- ServiceAccountToken, description="Last 4 characters of the tokens"
+ ServiceAccountToken, description="Last 4 characters of the tokens."
)
class Meta:
@@ -232,7 +232,7 @@ class User(MetadataObjectType, CountableDjangoObjectType):
),
model_field="gift_cards",
)
- note = graphene.String(description="A note about the customer")
+ note = graphene.String(description="A note about the customer.")
orders = gql_optimizer.field(
PrefetchingConnectionField(
"saleor.graphql.order.types.Order", description="List of user's orders."
@@ -251,7 +251,7 @@ class User(MetadataObjectType, CountableDjangoObjectType):
)
stored_payment_sources = graphene.List(
"saleor.graphql.payment.types.PaymentSource",
- description="List of stored payment sources",
+ description="List of stored payment sources.",
)
class Meta:
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py
index 8ad7cc4d08..00c8ca3bf6 100644
--- a/saleor/graphql/checkout/mutations.py
+++ b/saleor/graphql/checkout/mutations.py
@@ -414,10 +414,10 @@ class CheckoutCustomerAttach(BaseMutation):
class CheckoutCustomerDetach(BaseMutation):
- checkout = graphene.Field(Checkout, description="An updated checkout")
+ checkout = graphene.Field(Checkout, description="An updated checkout.")
class Arguments:
- checkout_id = graphene.ID(description="Checkout ID", required=True)
+ checkout_id = graphene.ID(description="Checkout ID.", required=True)
class Meta:
description = "Removes the user assigned as the owner of the checkout."
@@ -435,7 +435,7 @@ class CheckoutCustomerDetach(BaseMutation):
class CheckoutShippingAddressUpdate(BaseMutation, I18nMixin):
- checkout = graphene.Field(Checkout, description="An updated checkout")
+ checkout = graphene.Field(Checkout, description="An updated checkout.")
class Arguments:
checkout_id = graphene.ID(required=True, description="ID of the Checkout.")
@@ -492,7 +492,7 @@ class CheckoutShippingAddressUpdate(BaseMutation, I18nMixin):
class CheckoutBillingAddressUpdate(CheckoutShippingAddressUpdate):
- checkout = graphene.Field(Checkout, description="An updated checkout")
+ checkout = graphene.Field(Checkout, description="An updated checkout.")
class Arguments:
checkout_id = graphene.ID(required=True, description="ID of the Checkout.")
@@ -521,11 +521,11 @@ class CheckoutBillingAddressUpdate(CheckoutShippingAddressUpdate):
class CheckoutEmailUpdate(BaseMutation):
- checkout = graphene.Field(Checkout, description="An updated checkout")
+ checkout = graphene.Field(Checkout, description="An updated checkout.")
class Arguments:
- checkout_id = graphene.ID(description="Checkout ID")
- email = graphene.String(required=True, description="email")
+ checkout_id = graphene.ID(description="Checkout ID.")
+ email = graphene.String(required=True, description="email.")
class Meta:
description = "Updates email address in the existing Checkout object."
@@ -545,11 +545,11 @@ class CheckoutEmailUpdate(BaseMutation):
class CheckoutShippingMethodUpdate(BaseMutation):
- checkout = graphene.Field(Checkout, description="An updated checkout")
+ checkout = graphene.Field(Checkout, description="An updated checkout.")
class Arguments:
- checkout_id = graphene.ID(description="Checkout ID")
- shipping_method_id = graphene.ID(required=True, description="Shipping method")
+ checkout_id = graphene.ID(description="Checkout ID.")
+ shipping_method_id = graphene.ID(required=True, description="Shipping method.")
class Meta:
description = "Updates the shipping address of the checkout."
@@ -616,10 +616,10 @@ class CheckoutShippingMethodUpdate(BaseMutation):
class CheckoutComplete(BaseMutation):
- order = graphene.Field(Order, description="Placed order")
+ order = graphene.Field(Order, description="Placed order.")
class Arguments:
- checkout_id = graphene.ID(description="Checkout ID", required=True)
+ checkout_id = graphene.ID(description="Checkout ID.", required=True)
store_source = graphene.Boolean(
default_value=False,
description=(
@@ -703,11 +703,11 @@ class CheckoutComplete(BaseMutation):
class CheckoutUpdateVoucher(BaseMutation):
- checkout = graphene.Field(Checkout, description="An checkout with updated voucher")
+ checkout = graphene.Field(Checkout, description="An checkout with updated voucher.")
class Arguments:
- checkout_id = graphene.ID(description="Checkout ID", required=True)
- voucher_code = graphene.String(description="Voucher code")
+ checkout_id = graphene.ID(description="Checkout ID.", required=True)
+ voucher_code = graphene.String(description="Voucher code.")
class Meta:
description = (
@@ -760,13 +760,13 @@ class CheckoutUpdateVoucher(BaseMutation):
class CheckoutAddPromoCode(BaseMutation):
checkout = graphene.Field(
- Checkout, description="The checkout with the added gift card or voucher"
+ Checkout, description="The checkout with the added gift card or voucher."
)
class Arguments:
- checkout_id = graphene.ID(description="Checkout ID", required=True)
+ checkout_id = graphene.ID(description="Checkout ID.", required=True)
promo_code = graphene.String(
- description="Gift card code or voucher code", required=True
+ description="Gift card code or voucher code.", required=True
)
class Meta:
@@ -785,13 +785,13 @@ class CheckoutAddPromoCode(BaseMutation):
class CheckoutRemovePromoCode(BaseMutation):
checkout = graphene.Field(
- Checkout, description="The checkout with the removed gift card or voucher"
+ Checkout, description="The checkout with the removed gift card or voucher."
)
class Arguments:
- checkout_id = graphene.ID(description="Checkout ID", required=True)
+ checkout_id = graphene.ID(description="Checkout ID.", required=True)
promo_code = graphene.String(
- description="Gift card code or voucher code", required=True
+ description="Gift card code or voucher code.", required=True
)
class Meta:
@@ -830,7 +830,7 @@ class CheckoutUpdatePrivateMeta(UpdateMetaBaseMutation):
class CheckoutClearMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clear stored metadata value."
+ description = "Clear metadata for checkout."
permissions = ("order.manage_orders",)
model = models.Checkout
public = True
@@ -840,7 +840,7 @@ class CheckoutClearMeta(ClearMetaBaseMutation):
class CheckoutClearPrivateMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clear stored metadata value."
+ description = "Clear private metadata for checkout."
permissions = ("order.manage_orders",)
model = models.Checkout
public = False
diff --git a/saleor/graphql/checkout/schema.py b/saleor/graphql/checkout/schema.py
index fae000bd78..6a9d0f4ab8 100644
--- a/saleor/graphql/checkout/schema.py
+++ b/saleor/graphql/checkout/schema.py
@@ -30,18 +30,18 @@ from .types import Checkout, CheckoutLine
class CheckoutQueries(graphene.ObjectType):
checkout = graphene.Field(
Checkout,
- description="Lookup a checkout by token.",
- token=graphene.Argument(graphene.UUID, description="The checkout's token"),
+ description="Look up a checkout by token.",
+ token=graphene.Argument(graphene.UUID, description="The checkout's token."),
)
# FIXME we could optimize the below field
checkouts = BaseDjangoConnectionField(Checkout, description="List of checkouts.")
checkout_line = graphene.Field(
CheckoutLine,
id=graphene.Argument(graphene.ID, description="ID of the checkout line."),
- description="Lookup a checkout line by ID.",
+ description="Look up a checkout line by ID.",
)
checkout_lines = PrefetchingConnectionField(
- CheckoutLine, description="List of checkout lines"
+ CheckoutLine, description="List of checkout lines."
)
def resolve_checkout(self, *_args, token):
diff --git a/saleor/graphql/checkout/types.py b/saleor/graphql/checkout/types.py
index 01e8dc1a2c..80e9b8b498 100644
--- a/saleor/graphql/checkout/types.py
+++ b/saleor/graphql/checkout/types.py
@@ -73,10 +73,10 @@ class Checkout(MetadataObjectType, CountableDjangoObjectType):
available_payment_gateways = graphene.List(
PaymentGateway, description="List of available payment gateways.", required=True
)
- email = graphene.String(description="Email of a customer", required=True)
+ email = graphene.String(description="Email of a customer.", required=True)
gift_cards = gql_optimizer.field(
graphene.List(
- GiftCard, description="List of gift cards associated with this checkout"
+ GiftCard, description="List of gift cards associated with this checkout."
),
model_field="gift_cards",
)
@@ -134,7 +134,7 @@ class Checkout(MetadataObjectType, CountableDjangoObjectType):
"voucher_code",
"discount",
]
- description = "Checkout object"
+ description = "Checkout object."
model = models.Checkout
interfaces = [graphene.relay.Node]
filter_fields = ["token"]
diff --git a/saleor/graphql/core/connection.py b/saleor/graphql/core/connection.py
index b4ce8dd4a7..2f8df00e17 100644
--- a/saleor/graphql/core/connection.py
+++ b/saleor/graphql/core/connection.py
@@ -16,10 +16,12 @@ class NonNullConnection(Connection):
class EdgeBase:
node = Field(
cls._meta.node,
- description="The item at the end of the edge",
+ description="The item at the end of the edge.",
required=True,
)
- cursor = String(required=True, description="A cursor for use in pagination")
+ cursor = String(
+ required=True, description="A cursor for use in pagination."
+ )
# Create the edge type using the new EdgeBase.
edge_name = cls.Edge._meta.name
@@ -36,7 +38,7 @@ class CountableConnection(NonNullConnection):
class Meta:
abstract = True
- total_count = graphene.Int(description="A total count of items in the collection")
+ total_count = graphene.Int(description="A total count of items in the collection.")
@staticmethod
def resolve_total_count(root, *_args, **_kwargs):
diff --git a/saleor/graphql/core/mutations.py b/saleor/graphql/core/mutations.py
index 373f26931b..c6abf7ac78 100644
--- a/saleor/graphql/core/mutations.py
+++ b/saleor/graphql/core/mutations.py
@@ -580,7 +580,7 @@ class CreateToken(ObtainJSONWebToken):
"""Mutation that authenticates a user and returns token and user data.
It overrides the default graphql_jwt.ObtainJSONWebToken to wrap potential
- authentication errors in our Error type, which is consistent to how rest of
+ authentication errors in our Error type, which is consistent to how the rest of
the mutation works.
"""
@@ -602,7 +602,7 @@ class CreateToken(ObtainJSONWebToken):
class VerifyToken(Verify):
- """Mutation that confirm if token is valid and also return user data."""
+ """Mutation that confirms if token is valid and also return user data."""
user = graphene.Field(User)
diff --git a/saleor/graphql/core/schema.py b/saleor/graphql/core/schema.py
index 1008a056de..f8e3b6b558 100644
--- a/saleor/graphql/core/schema.py
+++ b/saleor/graphql/core/schema.py
@@ -13,7 +13,7 @@ class CoreMutations(graphene.ObjectType):
class CoreQueries(graphene.ObjectType):
tax_types = graphene.List(
- TaxType, description="List of all tax rates available from tax gateway"
+ TaxType, description="List of all tax rates available from tax gateway."
)
def resolve_tax_types(self, info):
diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py
index 2168cfce95..cb8862e0f0 100644
--- a/saleor/graphql/core/types/common.py
+++ b/saleor/graphql/core/types/common.py
@@ -109,8 +109,8 @@ class SeoInput(graphene.InputObjectType):
class Weight(graphene.ObjectType):
- unit = graphene.String(description="Weight unit", required=True)
- value = graphene.Float(description="Weight value", required=True)
+ unit = graphene.String(description="Weight unit.", required=True)
+ value = graphene.Float(description="Weight value.", required=True)
class Meta:
description = "Represents weight value in a specific weight unit."
@@ -140,29 +140,29 @@ class Image(graphene.ObjectType):
class PriceRangeInput(graphene.InputObjectType):
- gte = graphene.Float(description="Price greater than or equal", required=False)
- lte = graphene.Float(description="Price less than or equal", required=False)
+ gte = graphene.Float(description="Price greater than or equal to.", required=False)
+ lte = graphene.Float(description="Price less than or equal to.", required=False)
class DateRangeInput(graphene.InputObjectType):
- gte = graphene.Date(description="Start date", required=False)
- lte = graphene.Date(description="End date", required=False)
+ gte = graphene.Date(description="Start date.", required=False)
+ lte = graphene.Date(description="End date.", required=False)
class DateTimeRangeInput(graphene.InputObjectType):
- gte = graphene.DateTime(description="Start date", required=False)
- lte = graphene.DateTime(description="End date", required=False)
+ gte = graphene.DateTime(description="Start date.", required=False)
+ lte = graphene.DateTime(description="End date.", required=False)
class IntRangeInput(graphene.InputObjectType):
- gte = graphene.Int(description="Value greater than or equal", required=False)
- lte = graphene.Int(description="Value less than or equal", required=False)
+ gte = graphene.Int(description="Value greater than or equal to.", required=False)
+ lte = graphene.Int(description="Value less than or equal to.", required=False)
class TaxType(graphene.ObjectType):
"""Representation of tax types fetched from tax gateway."""
- description = graphene.String(description="Description of the tax type")
+ description = graphene.String(description="Description of the tax type.")
tax_code = graphene.String(
- description="External tax code used to identify given tax group"
+ description="External tax code used to identify given tax group."
)
diff --git a/saleor/graphql/core/types/meta.py b/saleor/graphql/core/types/meta.py
index 4a0ef59812..8d4a678b24 100644
--- a/saleor/graphql/core/types/meta.py
+++ b/saleor/graphql/core/types/meta.py
@@ -9,7 +9,7 @@ class MetaItem(graphene.ObjectType):
class MetaClientStore(graphene.ObjectType):
- name = graphene.String(required=True, description="Metadata clients name.")
+ name = graphene.String(required=True, description="Metadata client's name.")
metadata = graphene.List(
MetaItem, required=True, description="Metadata stored for a client."
)
@@ -47,7 +47,7 @@ class MetaPath(graphene.InputObjectType):
namespace = graphene.String(
required=True, description="Name of metadata client group."
)
- client_name = graphene.String(required=True, description="Metadata clients name.")
+ client_name = graphene.String(required=True, description="Metadata client's name.")
key = graphene.String(required=True, description="Key for stored data.")
diff --git a/saleor/graphql/core/types/money.py b/saleor/graphql/core/types/money.py
index 43decac7a0..1ec73e597a 100644
--- a/saleor/graphql/core/types/money.py
+++ b/saleor/graphql/core/types/money.py
@@ -39,7 +39,7 @@ class TaxedMoney(graphene.ObjectType):
class Meta:
description = """Represents a monetary value with taxes. In
- case when taxes were not applied, net and gross values will be equal.
+ cases where taxes were not applied, net and gross values will be equal.
"""
diff --git a/saleor/graphql/discount/mutations.py b/saleor/graphql/discount/mutations.py
index 211552477d..a7d4b98fc0 100644
--- a/saleor/graphql/discount/mutations.py
+++ b/saleor/graphql/discount/mutations.py
@@ -126,7 +126,7 @@ class VoucherInput(graphene.InputObjectType):
description="Voucher should be applied once per customer."
)
usage_limit = graphene.Int(
- description="Limit number of times this voucher can be used in total"
+ description="Limit number of times this voucher can be used in total."
)
diff --git a/saleor/graphql/discount/schema.py b/saleor/graphql/discount/schema.py
index e3ffb4eac6..c4d3d16c52 100644
--- a/saleor/graphql/discount/schema.py
+++ b/saleor/graphql/discount/schema.py
@@ -36,7 +36,7 @@ class DiscountQueries(graphene.ObjectType):
sale = graphene.Field(
Sale,
id=graphene.Argument(graphene.ID, description="ID of the sale.", required=True),
- description="Lookup a sale by ID.",
+ description="Look up a sale by ID.",
)
sales = FilterInputConnectionField(
Sale,
@@ -49,7 +49,7 @@ class DiscountQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, description="ID of the voucher.", required=True
),
- description="Lookup a voucher by ID.",
+ description="Look up a voucher by ID.",
)
vouchers = FilterInputConnectionField(
Voucher,
diff --git a/saleor/graphql/discount/types.py b/saleor/graphql/discount/types.py
index 0fa81795fd..cd8f0bfa88 100644
--- a/saleor/graphql/discount/types.py
+++ b/saleor/graphql/discount/types.py
@@ -101,7 +101,7 @@ class Voucher(CountableDjangoObjectType):
description="Determines a type of discount for voucher - value or percentage",
required=True,
)
- type = VoucherTypeEnum(description="Determines a type of voucher", required=True)
+ type = VoucherTypeEnum(description="Determines a type of voucher.", required=True)
min_amount_spent = graphene.Field(
types.Money,
deprecation_reason=(
diff --git a/saleor/graphql/extensions/mutations.py b/saleor/graphql/extensions/mutations.py
index 66fdaeab9f..05d5ef5459 100644
--- a/saleor/graphql/extensions/mutations.py
+++ b/saleor/graphql/extensions/mutations.py
@@ -7,20 +7,20 @@ from .types import Plugin
class ConfigurationItemInput(graphene.InputObjectType):
- name = graphene.String(required=True, description="Name of the field to update")
+ name = graphene.String(required=True, description="Name of the field to update.")
value = graphene.String(
- required=True, description="Value of the given field to update"
+ required=True, description="Value of the given field to update."
)
class PluginUpdateInput(graphene.InputObjectType):
active = graphene.Boolean(
- required=False, description="Indicates whether the plugin should be enabled"
+ required=False, description="Indicates whether the plugin should be enabled."
)
configuration = graphene.List(
ConfigurationItemInput,
required=False,
- description="Configuration of the plugin",
+ description="Configuration of the plugin.",
)
@@ -28,14 +28,14 @@ class PluginUpdate(BaseMutation):
plugin = graphene.Field(Plugin)
class Arguments:
- id = graphene.ID(required=True, description="ID of plugin to update")
+ id = graphene.ID(required=True, description="ID of plugin to update.")
input = PluginUpdateInput(
description="Fields required to update a plugin configuration.",
required=True,
)
class Meta:
- description = "Update plugin configuration"
+ description = "Update plugin configuration."
permissions = "extensions.manage_plugins"
error_type_class = ExtensionsError
error_type_field = "extensions_errors"
diff --git a/saleor/graphql/extensions/schema.py b/saleor/graphql/extensions/schema.py
index 09309df5aa..4d3caf91ca 100644
--- a/saleor/graphql/extensions/schema.py
+++ b/saleor/graphql/extensions/schema.py
@@ -14,12 +14,12 @@ class ExtensionsQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, description="ID of the plugin.", required=True
),
- description="Lookup a plugin by ID.",
+ description="Look up a plugin by ID.",
)
plugins = FilterInputConnectionField(
Plugin,
- filter=PluginFilterInput(description="Filtering options for plugins"),
- description="List of plugins",
+ filter=PluginFilterInput(description="Filtering options for plugins."),
+ description="List of plugins.",
)
@permission_required("extensions.manage_plugins")
diff --git a/saleor/graphql/extensions/types.py b/saleor/graphql/extensions/types.py
index 40c904a5c0..864f58826f 100644
--- a/saleor/graphql/extensions/types.py
+++ b/saleor/graphql/extensions/types.py
@@ -6,21 +6,21 @@ from .enums import ConfigurationTypeFieldEnum
class ConfigurationItem(graphene.ObjectType):
- name = graphene.String(required=True, description="Name of the field")
- value = graphene.String(required=True, description="Current value of the field")
- type = graphene.Field(ConfigurationTypeFieldEnum, description="Type of the field")
- help_text = graphene.String(required=False, description="Help text for the field")
- label = graphene.String(required=False, description="Label for the field")
+ name = graphene.String(required=True, description="Name of the field.")
+ value = graphene.String(required=True, description="Current value of the field.")
+ type = graphene.Field(ConfigurationTypeFieldEnum, description="Type of the field.")
+ help_text = graphene.String(required=False, description="Help text for the field.")
+ label = graphene.String(required=False, description="Label for the field.")
class Meta:
- description = "Stores information about single configuration field"
+ description = "Stores information about a single configuration field."
class Plugin(CountableDjangoObjectType):
configuration = graphene.List(ConfigurationItem)
class Meta:
- description = "Plugin"
+ description = "Plugin."
model = models.PluginConfiguration
interfaces = [graphene.relay.Node]
only_fields = ["name", "description", "active", "configuration"]
diff --git a/saleor/graphql/giftcard/mutations.py b/saleor/graphql/giftcard/mutations.py
index 06025bb5be..b9801d85fa 100644
--- a/saleor/graphql/giftcard/mutations.py
+++ b/saleor/graphql/giftcard/mutations.py
@@ -40,7 +40,7 @@ class GiftCardCreate(ModelMutation):
)
class Meta:
- description = "Creates a new gift card"
+ description = "Creates a new gift card."
model = models.GiftCard
permissions = ("giftcard.manage_gift_card",)
error_type_class = GiftCardError
diff --git a/saleor/graphql/giftcard/schema.py b/saleor/graphql/giftcard/schema.py
index 94d8d292e9..391f2b9c4b 100644
--- a/saleor/graphql/giftcard/schema.py
+++ b/saleor/graphql/giftcard/schema.py
@@ -18,9 +18,9 @@ class GiftCardQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, description="ID of the gift card.", required=True
),
- description="Lookup a gift card by ID.",
+ description="Look up a gift card by ID.",
)
- gift_cards = PrefetchingConnectionField(GiftCard, description="List of gift cards")
+ gift_cards = PrefetchingConnectionField(GiftCard, description="List of gift cards.")
@permission_required("giftcard.manage_gift_card")
def resolve_gift_card(self, info, **data):
diff --git a/saleor/graphql/giftcard/types.py b/saleor/graphql/giftcard/types.py
index a93e260a12..ad39ec5602 100644
--- a/saleor/graphql/giftcard/types.py
+++ b/saleor/graphql/giftcard/types.py
@@ -7,7 +7,7 @@ from ..decorators import permission_required
class GiftCard(CountableDjangoObjectType):
display_code = graphene.String(
- description="Code in format with allows displaying in a user interface."
+ description="Code in format which allows displaying in a user interface."
)
code = graphene.String(description="Gift card code.")
user = graphene.Field(
diff --git a/saleor/graphql/menu/enums.py b/saleor/graphql/menu/enums.py
index 68a77398d3..ba17dfb7bf 100644
--- a/saleor/graphql/menu/enums.py
+++ b/saleor/graphql/menu/enums.py
@@ -8,7 +8,7 @@ class NavigationType(graphene.Enum):
@property
def description(self):
if self == NavigationType.MAIN:
- return "Main storefront's navigation."
+ return "Main storefront navigation."
if self == NavigationType.SECONDARY:
- return "Secondary storefront's navigation."
+ return "Secondary storefront navigation."
raise ValueError("Unsupported enum value: %s" % self.value)
diff --git a/saleor/graphql/menu/mutations.py b/saleor/graphql/menu/mutations.py
index e02e09cda4..8d069ba245 100644
--- a/saleor/graphql/menu/mutations.py
+++ b/saleor/graphql/menu/mutations.py
@@ -37,7 +37,7 @@ class MenuItemInput(graphene.InputObjectType):
class MenuItemCreateInput(MenuItemInput):
name = graphene.String(description="Name of the menu item.", required=True)
menu = graphene.ID(
- description="Menu to which item belongs to.", name="menu", required=True
+ description="Menu to which item belongs.", name="menu", required=True
)
parent = graphene.ID(
description="""
@@ -63,7 +63,7 @@ class MenuCreate(ModelMutation):
)
class Meta:
- description = "Creates a new Menu"
+ description = "Creates a new Menu."
model = models.Menu
permissions = ("menu.manage_menus",)
error_type_class = MenuError
@@ -270,11 +270,11 @@ class MenuItemMove(BaseMutation):
class Arguments:
menu = graphene.ID(required=True, description="ID of the menu.")
moves = graphene.List(
- MenuItemMoveInput, required=True, description="The menu position data"
+ MenuItemMoveInput, required=True, description="The menu position data."
)
class Meta:
- description = "Moves items of menus"
+ description = "Moves items of menus."
permissions = ("menu.manage_menus",)
error_type_class = MenuError
error_type_field = "menu_errors"
diff --git a/saleor/graphql/menu/schema.py b/saleor/graphql/menu/schema.py
index 6b7c90d3f2..7b094e82e5 100644
--- a/saleor/graphql/menu/schema.py
+++ b/saleor/graphql/menu/schema.py
@@ -24,7 +24,7 @@ class MenuQueries(graphene.ObjectType):
Menu,
id=graphene.Argument(graphene.ID, description="ID of the menu."),
name=graphene.Argument(graphene.String, description="The menu's name."),
- description="Lookup a navigation menu by ID or name.",
+ description="Look up a navigation menu by ID or name.",
)
menus = FilterInputConnectionField(
Menu,
@@ -37,7 +37,7 @@ class MenuQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, description="ID of the menu item.", required=True
),
- description="Lookup a menu item by ID.",
+ description="Look up a menu item by ID.",
)
menu_items = FilterInputConnectionField(
MenuItem,
diff --git a/saleor/graphql/order/mutations/draft_orders.py b/saleor/graphql/order/mutations/draft_orders.py
index 9439262e1a..af62e92157 100644
--- a/saleor/graphql/order/mutations/draft_orders.py
+++ b/saleor/graphql/order/mutations/draft_orders.py
@@ -50,7 +50,7 @@ class DraftOrderInput(InputObjectType):
description="ID of a selected shipping method.", name="shippingMethod"
)
voucher = graphene.ID(
- description="ID of the voucher associated with the order", name="voucher"
+ description="ID of the voucher associated with the order.", name="voucher"
)
@@ -392,7 +392,7 @@ class DraftOrderLineUpdate(ModelMutation):
class Arguments:
id = graphene.ID(description="ID of the order line to update.", required=True)
input = OrderLineInput(
- required=True, description="Fields required to update an order line"
+ required=True, description="Fields required to update an order line."
)
class Meta:
diff --git a/saleor/graphql/order/mutations/fulfillments.py b/saleor/graphql/order/mutations/fulfillments.py
index e625c8e790..c9b01db117 100644
--- a/saleor/graphql/order/mutations/fulfillments.py
+++ b/saleor/graphql/order/mutations/fulfillments.py
@@ -24,7 +24,7 @@ class FulfillmentLineInput(graphene.InputObjectType):
class FulfillmentCreateInput(graphene.InputObjectType):
- tracking_number = graphene.String(description="Fulfillment tracking number")
+ tracking_number = graphene.String(description="Fulfillment tracking number.")
notify_customer = graphene.Boolean(
description="If true, send an email notification to the customer."
)
@@ -34,7 +34,7 @@ class FulfillmentCreateInput(graphene.InputObjectType):
class FulfillmentUpdateTrackingInput(graphene.InputObjectType):
- tracking_number = graphene.String(description="Fulfillment tracking number")
+ tracking_number = graphene.String(description="Fulfillment tracking number.")
notify_customer = graphene.Boolean(
description="If true, send an email notification to the customer."
)
@@ -149,7 +149,9 @@ class FulfillmentUpdateTracking(BaseMutation):
fulfillment = graphene.Field(
Fulfillment, description="A fulfillment with updated tracking."
)
- order = graphene.Field(Order, description="Order which fulfillment was updated.")
+ order = graphene.Field(
+ Order, description="Order for which fulfillment was updated."
+ )
class Arguments:
id = graphene.ID(required=True, description="ID of an fulfillment to update.")
diff --git a/saleor/graphql/order/mutations/orders.py b/saleor/graphql/order/mutations/orders.py
index d04182a54f..8ef8bcc861 100644
--- a/saleor/graphql/order/mutations/orders.py
+++ b/saleor/graphql/order/mutations/orders.py
@@ -178,7 +178,7 @@ class OrderUpdateShipping(BaseMutation):
description="ID of the order to update a shipping method.",
)
input = OrderUpdateShippingInput(
- description="Fields required to change " "shipping method of the order."
+ description="Fields required to change shipping method of the order."
)
class Meta:
diff --git a/saleor/graphql/order/schema.py b/saleor/graphql/order/schema.py
index 7912a66cb2..a8bcf17038 100644
--- a/saleor/graphql/order/schema.py
+++ b/saleor/graphql/order/schema.py
@@ -67,7 +67,7 @@ class OrderQueries(graphene.ObjectType):
)
order = graphene.Field(
Order,
- description="Lookup an order by ID.",
+ description="Look up an order by ID.",
id=graphene.Argument(graphene.ID, description="ID of an order.", required=True),
)
orders = FilterInputConnectionField(
@@ -78,7 +78,7 @@ class OrderQueries(graphene.ObjectType):
ReportingPeriod, description="Filter orders from a selected timespan."
),
status=graphene.Argument(
- OrderStatusFilter, description="Filter order by status"
+ OrderStatusFilter, description="Filter order by status."
),
description="List of orders.",
)
@@ -98,7 +98,7 @@ class OrderQueries(graphene.ObjectType):
)
order_by_token = graphene.Field(
Order,
- description="Lookup an order by token.",
+ description="Look up an order by token.",
token=graphene.Argument(
graphene.UUID, description="The order's token.", required=True
),
diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.py
index 9f8a270c6f..fd0d5b3a0b 100644
--- a/saleor/graphql/order/types.py
+++ b/saleor/graphql/order/types.py
@@ -34,22 +34,22 @@ class OrderEvent(CountableDjangoObjectType):
date = graphene.types.datetime.DateTime(
description="Date when event happened at in ISO 8601 format."
)
- type = OrderEventsEnum(description="Order event type")
+ type = OrderEventsEnum(description="Order event type.")
user = graphene.Field(
User,
id=graphene.Argument(graphene.ID),
description="User who performed the action.",
)
message = graphene.String(description="Content of the event.")
- email = graphene.String(description="Email of the customer")
+ email = graphene.String(description="Email of the customer.")
email_type = OrderEventsEmailsEnum(
- description="Type of an email sent to the customer"
+ description="Type of an email sent to the customer."
)
amount = graphene.Float(description="Amount of money.")
- payment_id = graphene.String(description="The payment ID from the payment gateway")
+ payment_id = graphene.String(description="The payment ID from the payment gateway.")
payment_gateway = graphene.String(description="The payment gateway of the payment.")
quantity = graphene.Int(description="Number of items.")
- composed_id = graphene.String(description="Composed id of the Fulfillment.")
+ composed_id = graphene.String(description="Composed ID of the Fulfillment.")
order_number = graphene.String(description="User-friendly number of an order.")
oversold_items = graphene.List(
graphene.String, description="List of oversold lines names."
@@ -159,7 +159,9 @@ class FulfillmentLine(CountableDjangoObjectType):
class Fulfillment(CountableDjangoObjectType):
lines = gql_optimizer.field(
- graphene.List(FulfillmentLine, description="List of lines for the fulfillment"),
+ graphene.List(
+ FulfillmentLine, description="List of lines for the fulfillment."
+ ),
model_field="lines",
)
status_display = graphene.String(description="User-friendly fulfillment status.")
@@ -189,7 +191,7 @@ class OrderLine(CountableDjangoObjectType):
thumbnail = graphene.Field(
Image,
description="The main thumbnail for the ordered product.",
- size=graphene.Argument(graphene.Int, description="Size of thumbnail"),
+ size=graphene.Argument(graphene.Int, description="Size of thumbnail."),
)
unit_price = graphene.Field(
TaxedMoney, description="Price of the single item in the order line."
@@ -282,7 +284,7 @@ class Order(MetadataObjectType, CountableDjangoObjectType):
description="User-friendly payment status."
)
payments = gql_optimizer.field(
- graphene.List(Payment, description="List of payments for the order"),
+ graphene.List(Payment, description="List of payments for the order."),
model_field="payments",
)
total = graphene.Field(TaxedMoney, description="Total amount of the order.")
@@ -291,7 +293,7 @@ class Order(MetadataObjectType, CountableDjangoObjectType):
TaxedMoney, description="The sum of line prices not including shipping."
)
gift_cards = gql_optimizer.field(
- graphene.List(GiftCard, description="List of userd gift cards"),
+ graphene.List(GiftCard, description="List of user gift cards."),
model_field="gift_cards",
)
status_display = graphene.String(description="User-friendly order status.")
diff --git a/saleor/graphql/page/mutations.py b/saleor/graphql/page/mutations.py
index 913fa96ea5..9cbcbe8290 100644
--- a/saleor/graphql/page/mutations.py
+++ b/saleor/graphql/page/mutations.py
@@ -11,11 +11,11 @@ class PageInput(graphene.InputObjectType):
slug = graphene.String(description="Page internal name.")
title = graphene.String(description="Page title.")
content = graphene.String(
- description=("Page content. May consists of ordinary text, HTML and images.")
+ description=("Page content. May consist of ordinary text, HTML and images.")
)
content_json = graphene.JSONString(description="Page content in JSON format.")
is_published = graphene.Boolean(
- description="Determines if page is visible in the storefront"
+ description="Determines if page is visible in the storefront."
)
publication_date = graphene.String(
description="Publication date. ISO 8601 standard."
diff --git a/saleor/graphql/page/schema.py b/saleor/graphql/page/schema.py
index 8d0c812abd..2be961c8eb 100644
--- a/saleor/graphql/page/schema.py
+++ b/saleor/graphql/page/schema.py
@@ -15,7 +15,7 @@ class PageQueries(graphene.ObjectType):
Page,
id=graphene.Argument(graphene.ID, description="ID of the page."),
slug=graphene.String(description="The slug of the page."),
- description="Lookup a page by ID or slug.",
+ description="Look up a page by ID or slug.",
)
pages = FilterInputConnectionField(
Page,
diff --git a/saleor/graphql/payment/mutations.py b/saleor/graphql/payment/mutations.py
index 8fdd3e4318..eea09a0aae 100644
--- a/saleor/graphql/payment/mutations.py
+++ b/saleor/graphql/payment/mutations.py
@@ -118,14 +118,14 @@ class CheckoutPaymentCreate(BaseMutation, I18nMixin):
class PaymentCapture(BaseMutation):
- payment = graphene.Field(Payment, description="Updated payment")
+ payment = graphene.Field(Payment, description="Updated payment.")
class Arguments:
- payment_id = graphene.ID(required=True, description="Payment ID")
- amount = Decimal(description="Transaction amount")
+ payment_id = graphene.ID(required=True, description="Payment ID.")
+ amount = Decimal(description="Transaction amount.")
class Meta:
- description = "Captures the authorized payment amount"
+ description = "Captures the authorized payment amount."
permissions = ("order.manage_orders",)
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
@@ -144,7 +144,7 @@ class PaymentCapture(BaseMutation):
class PaymentRefund(PaymentCapture):
class Meta:
- description = "Refunds the captured payment amount"
+ description = "Refunds the captured payment amount."
permissions = ("order.manage_orders",)
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
@@ -162,13 +162,13 @@ class PaymentRefund(PaymentCapture):
class PaymentVoid(BaseMutation):
- payment = graphene.Field(Payment, description="Updated payment")
+ payment = graphene.Field(Payment, description="Updated payment.")
class Arguments:
- payment_id = graphene.ID(required=True, description="Payment ID")
+ payment_id = graphene.ID(required=True, description="Payment ID.")
class Meta:
- description = "Voids the authorized payment"
+ description = "Voids the authorized payment."
permissions = ("order.manage_orders",)
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
@@ -186,13 +186,13 @@ class PaymentVoid(BaseMutation):
class PaymentSecureConfirm(BaseMutation):
- payment = graphene.Field(Payment, description="Updated payment")
+ payment = graphene.Field(Payment, description="Updated payment.")
class Arguments:
- payment_id = graphene.ID(required=True, description="Payment ID")
+ payment_id = graphene.ID(required=True, description="Payment ID.")
class Meta:
- description = "Confirms payment in two step process like 3D secure"
+ description = "Confirms payment in a two-step process like 3D secure"
error_type_class = common_types.PaymentError
error_type_field = "payment_errors"
diff --git a/saleor/graphql/payment/schema.py b/saleor/graphql/payment/schema.py
index 0fde9dd4cb..912df49f70 100644
--- a/saleor/graphql/payment/schema.py
+++ b/saleor/graphql/payment/schema.py
@@ -10,12 +10,12 @@ from .types import Payment
class PaymentQueries(graphene.ObjectType):
payment = graphene.Field(
Payment,
- description="Lookup a payment by ID.",
+ description="Look up a payment by ID.",
id=graphene.Argument(
graphene.ID, description="ID of the payment.", required=True
),
)
- payments = PrefetchingConnectionField(Payment, description="List of payments")
+ payments = PrefetchingConnectionField(Payment, description="List of payments.")
payment_client_token = graphene.Field(
graphene.String,
gateway=graphene.String(required=True, description="A payment gateway."),
diff --git a/saleor/graphql/payment/types.py b/saleor/graphql/payment/types.py
index 84792df213..4f7f83a21e 100644
--- a/saleor/graphql/payment/types.py
+++ b/saleor/graphql/payment/types.py
@@ -59,9 +59,9 @@ class PaymentSource(graphene.ObjectType):
"for user in payment gateway, such as credit card."
)
- gateway = graphene.String(description="Payment gateway name", required=True)
+ gateway = graphene.String(description="Payment gateway name.", required=True)
credit_card_info = graphene.Field(
- CreditCard, description="Stored credit card details if available"
+ CreditCard, description="Stored credit card details if available."
)
diff --git a/saleor/graphql/product/mutations/attributes.py b/saleor/graphql/product/mutations/attributes.py
index 077b1c631a..b03313f6ab 100644
--- a/saleor/graphql/product/mutations/attributes.py
+++ b/saleor/graphql/product/mutations/attributes.py
@@ -91,14 +91,14 @@ class AttributeUpdateInput(graphene.InputObjectType):
class AttributeAssignInput(graphene.InputObjectType):
- id = graphene.ID(required=True, description="The ID of the attribute to assign")
+ id = graphene.ID(required=True, description="The ID of the attribute to assign.")
type = AttributeTypeEnum(
required=True, description="The attribute type to be assigned as."
)
class ReorderInput(graphene.InputObjectType):
- id = graphene.ID(required=True, description="The ID of the item to move")
+ id = graphene.ID(required=True, description="The ID of the item to move.")
sort_order = graphene.Int(
description=(
"The new relative sorting position of the item (from -inf to +inf)"
@@ -462,7 +462,7 @@ class AttributeUnassign(BaseMutation):
attribute_ids = graphene.List(
graphene.ID,
required=True,
- description="The IDs of the attributes to assign",
+ description="The IDs of the attributes to assign.",
)
class Meta:
@@ -518,7 +518,7 @@ class AttributeDelete(ModelDeleteMutation):
class AttributeUpdateMeta(UpdateMetaBaseMutation):
class Meta:
model = models.Attribute
- description = "Update public metadata for Attribute "
+ description = "Update public metadata for Attribute."
permissions = ("product.manage_products",)
public = True
error_type_class = ProductError
@@ -527,7 +527,7 @@ class AttributeUpdateMeta(UpdateMetaBaseMutation):
class AttributeClearMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clears public metadata item for Attribute"
+ description = "Clears public metadata item for Attribute."
model = models.Attribute
permissions = ("product.manage_products",)
public = True
@@ -537,7 +537,7 @@ class AttributeClearMeta(ClearMetaBaseMutation):
class AttributeUpdatePrivateMeta(UpdateMetaBaseMutation):
class Meta:
- description = "Update public metadata for Attribute"
+ description = "Update public metadata for Attribute."
model = models.Attribute
permissions = ("product.manage_products",)
public = False
@@ -547,7 +547,7 @@ class AttributeUpdatePrivateMeta(UpdateMetaBaseMutation):
class AttributeClearPrivateMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clears public metadata item for Attribute"
+ description = "Clears public metadata item for Attribute."
model = models.Attribute
permissions = ("product.manage_products",)
public = False
@@ -677,7 +677,7 @@ class ProductTypeReorderAttributes(BaseMutation):
)
class Meta:
- description = "Reorder the attributes of a product type"
+ description = "Reorder the attributes of a product type."
permissions = ("product.manage_products",)
error_type_class = ProductError
error_type_field = "product_errors"
@@ -753,7 +753,7 @@ class AttributeReorderValues(BaseMutation):
)
class Meta:
- description = "Reorder the values of an attribute"
+ description = "Reorder the values of an attribute."
permissions = ("product.manage_products",)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/digital_contents.py b/saleor/graphql/product/mutations/digital_contents.py
index b743c03dad..4f1cd2ec27 100644
--- a/saleor/graphql/product/mutations/digital_contents.py
+++ b/saleor/graphql/product/mutations/digital_contents.py
@@ -12,7 +12,7 @@ from ..types import DigitalContent, ProductVariant
class DigitalContentInput(graphene.InputObjectType):
use_default_settings = graphene.Boolean(
- description="Use default digital content settings for this product",
+ description="Use default digital content settings for this product.",
required=True,
)
max_downloads = graphene.Int(
@@ -123,7 +123,7 @@ class DigitalContentDelete(BaseMutation):
)
class Meta:
- description = "Remove digital content assigned to given variant"
+ description = "Remove digital content assigned to given variant."
error_type_class = ProductError
error_type_field = "product_errors"
@@ -154,7 +154,7 @@ class DigitalContentUpdate(BaseMutation):
)
class Meta:
- description = "Update digital content"
+ description = "Update digital content."
error_type_class = ProductError
error_type_field = "product_errors"
@@ -220,7 +220,7 @@ class DigitalContentUpdate(BaseMutation):
class DigitalContentUrlCreateInput(graphene.InputObjectType):
content = graphene.ID(
- description="Digital content ID which url will belong to",
+ description="Digital content ID which URL will belong to.",
name="content",
required=True,
)
@@ -233,7 +233,7 @@ class DigitalContentUrlCreate(ModelMutation):
)
class Meta:
- description = "Generate new url to digital content"
+ description = "Generate new URL to digital content."
model = models.DigitalContentUrl
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/mutations/products.py b/saleor/graphql/product/mutations/products.py
index 22606ec175..71e30b4ba6 100644
--- a/saleor/graphql/product/mutations/products.py
+++ b/saleor/graphql/product/mutations/products.py
@@ -236,7 +236,7 @@ class CollectionReorderProducts(BaseMutation):
)
class Meta:
- description = "Reorder the products of a collection"
+ description = "Reorder the products of a collection."
permissions = ("product.manage_products",)
error_type_class = ProductError
error_type_field = "product_errors"
@@ -371,7 +371,7 @@ class CollectionRemoveProducts(BaseMutation):
class CollectionUpdateMeta(UpdateMetaBaseMutation):
class Meta:
model = models.Collection
- description = "Update public metadata for Collection"
+ description = "Update public metadata for Collection."
permissions = ("product.manage_products",)
public = True
error_type_class = ProductError
@@ -381,7 +381,7 @@ class CollectionUpdateMeta(UpdateMetaBaseMutation):
class CollectionClearMeta(ClearMetaBaseMutation):
class Meta:
model = models.Collection
- description = "Clears public metadata item for Collection"
+ description = "Clears public metadata for Collection."
permissions = ("product.manage_products",)
public = True
error_type_class = ProductError
@@ -391,7 +391,7 @@ class CollectionClearMeta(ClearMetaBaseMutation):
class CollectionUpdatePrivateMeta(UpdateMetaBaseMutation):
class Meta:
model = models.Collection
- description = "Update public metadata for Collection"
+ description = "Update private metadata for Collection."
permissions = ("product.manage_products",)
public = False
error_type_class = ProductError
@@ -401,7 +401,7 @@ class CollectionUpdatePrivateMeta(UpdateMetaBaseMutation):
class CollectionClearPrivateMeta(ClearMetaBaseMutation):
class Meta:
model = models.Collection
- description = "Clears public metadata item for Collection"
+ description = "Clears private metadata item for Collection."
permissions = ("product.manage_products",)
public = False
error_type_class = ProductError
@@ -411,7 +411,7 @@ class CollectionClearPrivateMeta(ClearMetaBaseMutation):
class CategoryUpdateMeta(UpdateMetaBaseMutation):
class Meta:
model = models.Category
- description = "Update public metadata for category"
+ description = "Update public metadata for category."
permissions = ("product.manage_products",)
public = True
error_type_class = ProductError
@@ -421,7 +421,7 @@ class CategoryUpdateMeta(UpdateMetaBaseMutation):
class CategoryClearMeta(ClearMetaBaseMutation):
class Meta:
model = models.Category
- description = "Clears public metadata item for category"
+ description = "Clears public metadata for category."
permissions = ("product.manage_products",)
public = True
error_type_class = ProductError
@@ -431,7 +431,7 @@ class CategoryClearMeta(ClearMetaBaseMutation):
class CategoryUpdatePrivateMeta(UpdateMetaBaseMutation):
class Meta:
model = models.Category
- description = "Update public metadata for category"
+ description = "Update private metadata for category."
permissions = ("product.manage_products",)
public = False
error_type_class = ProductError
@@ -441,7 +441,7 @@ class CategoryUpdatePrivateMeta(UpdateMetaBaseMutation):
class CategoryClearPrivateMeta(ClearMetaBaseMutation):
class Meta:
model = models.Category
- description = "Clears public metadata item for category"
+ description = "Clears private metadata for category."
permissions = ("product.manage_products",)
public = False
error_type_class = ProductError
@@ -449,7 +449,7 @@ class CategoryClearPrivateMeta(ClearMetaBaseMutation):
class AttributeValueInput(InputObjectType):
- id = graphene.ID(description="ID of the selected attribute")
+ id = graphene.ID(description="ID of the selected attribute.")
slug = graphene.String(description="Slug of the selected attribute.")
values = graphene.List(
graphene.String,
@@ -482,7 +482,7 @@ class ProductInput(graphene.InputObjectType):
)
name = graphene.String(description="Product name.")
base_price = Decimal(description="Product price.")
- tax_code = graphene.String(description="Tax rate for enabled tax gateway")
+ tax_code = graphene.String(description="Tax rate for enabled tax gateway.")
seo = SeoInput(description="Search engine optimization fields.")
weight = WeightScalar(description="Weight of the Product.", required=False)
sku = graphene.String(
@@ -942,7 +942,7 @@ class ProductDelete(ModelDeleteMutation):
class ProductUpdateMeta(UpdateMetaBaseMutation):
class Meta:
model = models.Product
- description = "Update public metadata for product"
+ description = "Update public metadata for product."
permissions = ("product.manage_products",)
public = True
error_type_class = ProductError
@@ -951,7 +951,7 @@ class ProductUpdateMeta(UpdateMetaBaseMutation):
class ProductClearMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clears public metadata item for product"
+ description = "Clears public metadata item for product."
model = models.Product
permissions = ("product.manage_products",)
public = True
@@ -961,7 +961,7 @@ class ProductClearMeta(ClearMetaBaseMutation):
class ProductUpdatePrivateMeta(UpdateMetaBaseMutation):
class Meta:
- description = "Update public metadata for product"
+ description = "Update private metadata for product."
model = models.Product
permissions = ("product.manage_products",)
public = False
@@ -971,7 +971,7 @@ class ProductUpdatePrivateMeta(UpdateMetaBaseMutation):
class ProductClearPrivateMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clears public metadata item for product"
+ description = "Clears private metadata item for product."
model = models.Product
permissions = ("product.manage_products",)
public = False
@@ -1019,7 +1019,7 @@ class ProductVariantCreate(ModelMutation):
)
class Meta:
- description = "Creates a new variant for a product"
+ description = "Creates a new variant for a product."
model = models.ProductVariant
permissions = ("product.manage_products",)
error_type_class = ProductError
@@ -1114,7 +1114,7 @@ class ProductVariantUpdate(ProductVariantCreate):
)
class Meta:
- description = "Updates an existing variant for product"
+ description = "Updates an existing variant for product."
model = models.ProductVariant
permissions = ("product.manage_products",)
error_type_class = ProductError
@@ -1144,7 +1144,7 @@ class ProductVariantDelete(ModelDeleteMutation):
class ProductVariantUpdateMeta(UpdateMetaBaseMutation):
class Meta:
model = models.ProductVariant
- description = "Update public metadata for product variant"
+ description = "Update public metadata for product variant."
permissions = ("product.manage_products",)
public = True
error_type_class = ProductError
@@ -1154,7 +1154,7 @@ class ProductVariantUpdateMeta(UpdateMetaBaseMutation):
class ProductVariantClearMeta(ClearMetaBaseMutation):
class Meta:
model = models.ProductVariant
- description = "Clears public metadata item for product variant"
+ description = "Clears public metadata for product variant."
permissions = ("product.manage_products",)
public = True
error_type_class = ProductError
@@ -1164,7 +1164,7 @@ class ProductVariantClearMeta(ClearMetaBaseMutation):
class ProductVariantUpdatePrivateMeta(UpdateMetaBaseMutation):
class Meta:
model = models.ProductVariant
- description = "Update public metadata for product variant"
+ description = "Update private metadata for product variant."
permissions = ("product.manage_products",)
public = False
error_type_class = ProductError
@@ -1174,7 +1174,7 @@ class ProductVariantUpdatePrivateMeta(UpdateMetaBaseMutation):
class ProductVariantClearPrivateMeta(ClearMetaBaseMutation):
class Meta:
model = models.ProductVariant
- description = "Clears public metadata item for product variant"
+ description = "Clears private metadata for product variant."
permissions = ("product.manage_products",)
public = False
error_type_class = ProductError
@@ -1208,7 +1208,7 @@ class ProductTypeInput(graphene.InputObjectType):
description="Determines if products are digital.", required=False
)
weight = WeightScalar(description="Weight of the ProductType items.")
- tax_code = graphene.String(description="Tax rate for enabled tax gateway")
+ tax_code = graphene.String(description="Tax rate for enabled tax gateway.")
class ProductTypeCreate(ModelMutation):
@@ -1293,7 +1293,7 @@ class ProductTypeDelete(ModelDeleteMutation):
class ProductTypeUpdateMeta(UpdateMetaBaseMutation):
class Meta:
model = models.ProductType
- description = "Update public metadata for product type"
+ description = "Update public metadata for product type."
permissions = ("product.manage_products",)
public = True
error_type_class = ProductError
@@ -1302,7 +1302,7 @@ class ProductTypeUpdateMeta(UpdateMetaBaseMutation):
class ProductTypeClearMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clears public metadata item for product type"
+ description = "Clears public metadata for product type."
model = models.ProductType
permissions = ("product.manage_products",)
public = True
@@ -1312,7 +1312,7 @@ class ProductTypeClearMeta(ClearMetaBaseMutation):
class ProductTypeUpdatePrivateMeta(UpdateMetaBaseMutation):
class Meta:
- description = "Update public metadata for product type"
+ description = "Update private metadata for product type."
model = models.ProductType
permissions = ("product.manage_products",)
public = False
@@ -1322,7 +1322,7 @@ class ProductTypeUpdatePrivateMeta(UpdateMetaBaseMutation):
class ProductTypeClearPrivateMeta(ClearMetaBaseMutation):
class Meta:
- description = "Clears public metadata item for product type"
+ description = "Clears private metadata for product type."
model = models.ProductType
permissions = ("product.manage_products",)
public = False
@@ -1496,7 +1496,7 @@ class VariantImageAssign(BaseMutation):
variant_id = graphene.ID(required=True, description="ID of a product variant.")
class Meta:
- description = "Assign an image to a product variant"
+ description = "Assign an image to a product variant."
permissions = ("product.manage_products",)
error_type_class = ProductError
error_type_field = "product_errors"
@@ -1540,7 +1540,7 @@ class VariantImageUnassign(BaseMutation):
variant_id = graphene.ID(required=True, description="ID of a product variant.")
class Meta:
- description = "Unassign an image from a product variant"
+ description = "Unassign an image from a product variant."
permissions = ("product.manage_products",)
error_type_class = ProductError
error_type_field = "product_errors"
diff --git a/saleor/graphql/product/schema.py b/saleor/graphql/product/schema.py
index e212504682..b37e1e7315 100644
--- a/saleor/graphql/product/schema.py
+++ b/saleor/graphql/product/schema.py
@@ -127,13 +127,13 @@ from .types.attributes import AttributeSortingInput
class ProductQueries(graphene.ObjectType):
digital_content = graphene.Field(
DigitalContent,
- description="Lookup a digital content by ID.",
+ description="Look up digital content by ID.",
id=graphene.Argument(
graphene.ID, description="ID of the digital content.", required=True
),
)
digital_contents = PrefetchingConnectionField(
- DigitalContent, description="List of the digital contents."
+ DigitalContent, description="List of digital content."
)
attributes = FilterInputConnectionField(
Attribute,
@@ -165,7 +165,7 @@ class ProductQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, description="ID of the attribute.", required=True
),
- description="Lookup an attribute by ID.",
+ description="Look up an attribute by ID.",
)
categories = FilterInputConnectionField(
Category,
@@ -182,14 +182,14 @@ class ProductQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, required=True, description="ID of the category."
),
- description="Lookup a category by ID.",
+ description="Look up a category by ID.",
)
collection = graphene.Field(
Collection,
id=graphene.Argument(
graphene.ID, description="ID of the collection.", required=True
),
- description="Lookup a collection by ID.",
+ description="Look up a collection by ID.",
)
collections = FilterInputConnectionField(
Collection,
@@ -202,7 +202,7 @@ class ProductQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, description="ID of the product.", required=True
),
- description="Lookup a product by ID.",
+ description="Look up a product by ID.",
)
products = FilterInputConnectionField(
Product,
@@ -230,7 +230,7 @@ class ProductQueries(graphene.ObjectType):
),
sort_by=graphene.Argument(ProductOrder, description="Sort products."),
stock_availability=graphene.Argument(
- StockAvailability, description="Filter products by the stock availability"
+ StockAvailability, description="Filter products by stock availability."
),
query=graphene.String(description=DESCRIPTIONS["product"]),
description="List of the shop's products.",
@@ -240,7 +240,7 @@ class ProductQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, description="ID of the product type.", required=True
),
- description="Lookup a product type by ID.",
+ description="Look up a product type by ID.",
)
product_types = FilterInputConnectionField(
ProductType,
@@ -255,7 +255,7 @@ class ProductQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, description="ID of the product variant.", required=True
),
- description="Lookup a product variant by ID.",
+ description="Look up a product variant by ID.",
)
product_variants = PrefetchingConnectionField(
ProductVariant,
diff --git a/saleor/graphql/product/types/attributes.py b/saleor/graphql/product/types/attributes.py
index 9b82c42469..2fa8e5b240 100644
--- a/saleor/graphql/product/types/attributes.py
+++ b/saleor/graphql/product/types/attributes.py
@@ -44,7 +44,7 @@ class AttributeSortingInput(graphene.InputObjectType):
direction = graphene.Argument(
OrderDirection,
required=True,
- description="Specifies the direction in which to sort the attributes",
+ description="Specifies the direction in which to sort the attributes.",
)
diff --git a/saleor/graphql/product/types/digital_contents.py b/saleor/graphql/product/types/digital_contents.py
index a74df3ed27..52ee72cfff 100644
--- a/saleor/graphql/product/types/digital_contents.py
+++ b/saleor/graphql/product/types/digital_contents.py
@@ -10,7 +10,7 @@ from ...decorators import permission_required
class DigitalContentUrl(CountableDjangoObjectType):
- url = graphene.String(description="Url for digital content")
+ url = graphene.String(description="URL for digital content.")
class Meta:
model = models.DigitalContentUrl
@@ -26,7 +26,7 @@ class DigitalContent(CountableDjangoObjectType, MetadataObjectType):
urls = gql_optimizer.field(
graphene.List(
lambda: DigitalContentUrl,
- description="List of urls for the digital variant",
+ description="List of URLs for the digital variant.",
),
model_field="urls",
)
diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.py
index b08cbc58e9..6a47838067 100644
--- a/saleor/graphql/product/types/products.py
+++ b/saleor/graphql/product/types/products.py
@@ -139,7 +139,7 @@ class ProductOrder(graphene.InputObjectType):
direction = graphene.Argument(
OrderDirection,
required=True,
- description="Specifies the direction in which to sort products",
+ description="Specifies the direction in which to sort products.",
)
@@ -262,7 +262,7 @@ class ProductVariant(CountableDjangoObjectType, MetadataObjectType):
)
images = gql_optimizer.field(
graphene.List(
- lambda: ProductImage, description="List of images for the product variant"
+ lambda: ProductImage, description="List of images for the product variant."
),
model_field="images",
)
@@ -280,7 +280,7 @@ class ProductVariant(CountableDjangoObjectType, MetadataObjectType):
)
digital_content = gql_optimizer.field(
graphene.Field(
- DigitalContent, description="Digital content for the product variant"
+ DigitalContent, description="Digital content for the product variant."
),
model_field="digital_content",
)
@@ -409,7 +409,7 @@ class Product(CountableDjangoObjectType, MetadataObjectType):
thumbnail = graphene.Field(
Image,
description="The main thumbnail for a product.",
- size=graphene.Argument(graphene.Int, description="Size of thumbnail"),
+ size=graphene.Argument(graphene.Int, description="Size of thumbnail."),
)
availability = graphene.Field(
ProductPricingInfo,
@@ -453,21 +453,21 @@ class Product(CountableDjangoObjectType, MetadataObjectType):
image_by_id = graphene.Field(
lambda: ProductImage,
id=graphene.Argument(graphene.ID, description="ID of a product image."),
- description="Get a single product image by ID",
+ description="Get a single product image by ID.",
)
variants = gql_optimizer.field(
- graphene.List(ProductVariant, description="List of variants for the product"),
+ graphene.List(ProductVariant, description="List of variants for the product."),
model_field="variants",
)
images = gql_optimizer.field(
graphene.List(
- lambda: ProductImage, description="List of images for the product"
+ lambda: ProductImage, description="List of images for the product."
),
model_field="images",
)
collections = gql_optimizer.field(
graphene.List(
- lambda: Collection, description="List of collections for the product"
+ lambda: Collection, description="List of collections for the product."
),
model_field="collections",
)
@@ -723,7 +723,7 @@ class Collection(CountableDjangoObjectType, MetadataObjectType):
prefetch_related=prefetch_products_collection_sorted,
)
background_image = graphene.Field(
- Image, size=graphene.Int(description="Size of the image")
+ Image, size=graphene.Int(description="Size of the image.")
)
translation = graphene.Field(
CollectionTranslation,
@@ -805,7 +805,7 @@ class Category(CountableDjangoObjectType, MetadataObjectType):
lambda: Category, description="List of children of the category."
)
background_image = graphene.Field(
- Image, size=graphene.Int(description="Size of the image")
+ Image, size=graphene.Int(description="Size of the image.")
)
translation = graphene.Field(
CategoryTranslation,
@@ -889,7 +889,7 @@ class ProductImage(CountableDjangoObjectType):
url = graphene.String(
required=True,
description="The URL of the image.",
- size=graphene.Int(description="Size of the image"),
+ size=graphene.Int(description="Size of the image."),
)
class Meta:
diff --git a/saleor/graphql/shipping/mutations.py b/saleor/graphql/shipping/mutations.py
index c12fd40485..67d9a2894e 100644
--- a/saleor/graphql/shipping/mutations.py
+++ b/saleor/graphql/shipping/mutations.py
@@ -15,16 +15,16 @@ class ShippingPriceInput(graphene.InputObjectType):
name = graphene.String(description="Name of the shipping method.")
price = Decimal(description="Shipping price of the shipping method.")
minimum_order_price = Decimal(
- description="Minimum order price to use this shipping method"
+ description="Minimum order price to use this shipping method."
)
maximum_order_price = Decimal(
- description="Maximum order price to use this shipping method"
+ description="Maximum order price to use this shipping method."
)
minimum_order_weight = WeightScalar(
- description="Minimum order weight to use this shipping method"
+ description="Minimum order weight to use this shipping method."
)
maximum_order_weight = WeightScalar(
- description="Maximum order weight to use this shipping method"
+ description="Maximum order weight to use this shipping method."
)
type = ShippingMethodTypeEnum(description="Shipping type: price or weight based.")
shipping_zone = graphene.ID(
@@ -41,7 +41,7 @@ class ShippingZoneInput(graphene.InputObjectType):
)
default = graphene.Boolean(
description="""
- Is default shipping zone, that will be used
+ Default shipping zone will be used
for countries not covered by other zones."""
)
@@ -181,7 +181,7 @@ class ShippingPriceCreate(ShippingPriceMixin, ModelMutation):
class Arguments:
input = ShippingPriceInput(
- description="Fields required to create a shipping price", required=True
+ description="Fields required to create a shipping price.", required=True
)
class Meta:
@@ -207,7 +207,7 @@ class ShippingPriceUpdate(ShippingPriceMixin, ModelMutation):
class Arguments:
id = graphene.ID(description="ID of a shipping price to update.", required=True)
input = ShippingPriceInput(
- description="Fields required to update a shipping price", required=True
+ description="Fields required to update a shipping price.", required=True
)
class Meta:
diff --git a/saleor/graphql/shipping/schema.py b/saleor/graphql/shipping/schema.py
index 9eef8e692e..157c4e5c17 100644
--- a/saleor/graphql/shipping/schema.py
+++ b/saleor/graphql/shipping/schema.py
@@ -22,7 +22,7 @@ class ShippingQueries(graphene.ObjectType):
id=graphene.Argument(
graphene.ID, description="ID of the shipping zone.", required=True
),
- description="Lookup a shipping zone by ID.",
+ description="Look up a shipping zone by ID.",
)
shipping_zones = PrefetchingConnectionField(
ShippingZone, description="List of the shop's shipping zones."
diff --git a/saleor/graphql/shop/mutations.py b/saleor/graphql/shop/mutations.py
index aa1d8923d5..a81abed2c0 100644
--- a/saleor/graphql/shop/mutations.py
+++ b/saleor/graphql/shop/mutations.py
@@ -16,35 +16,35 @@ from .types import AuthorizationKey, AuthorizationKeyType, Shop
class ShopSettingsInput(graphene.InputObjectType):
- header_text = graphene.String(description="Header text")
- description = graphene.String(description="SEO description")
- include_taxes_in_prices = graphene.Boolean(description="Include taxes in prices")
+ header_text = graphene.String(description="Header text.")
+ description = graphene.String(description="SEO description.")
+ include_taxes_in_prices = graphene.Boolean(description="Include taxes in prices.")
display_gross_prices = graphene.Boolean(
- description="Display prices with tax in store"
+ description="Display prices with tax in store."
)
- charge_taxes_on_shipping = graphene.Boolean(description="Charge taxes on shipping")
+ charge_taxes_on_shipping = graphene.Boolean(description="Charge taxes on shipping.")
track_inventory_by_default = graphene.Boolean(
- description="Enable inventory tracking"
+ description="Enable inventory tracking."
)
- default_weight_unit = WeightUnitsEnum(description="Default weight unit")
+ default_weight_unit = WeightUnitsEnum(description="Default weight unit.")
automatic_fulfillment_digital_products = graphene.Boolean(
- description="Enable automatic fulfillment for all digital products"
+ description="Enable automatic fulfillment for all digital products."
)
default_digital_max_downloads = graphene.Int(
- description="Default number of max downloads per digital content url"
+ description="Default number of max downloads per digital content URL."
)
default_digital_url_valid_days = graphene.Int(
- description=("Default number of days which digital content url will be valid")
+ description=("Default number of days which digital content URL will be valid.")
)
class SiteDomainInput(graphene.InputObjectType):
- domain = graphene.String(description="Domain name for shop")
- name = graphene.String(description="Shop site name")
+ domain = graphene.String(description="Domain name for shop.")
+ name = graphene.String(description="Shop site name.")
class ShopSettingsUpdate(BaseMutation):
- shop = graphene.Field(Shop, description="Updated Shop")
+ shop = graphene.Field(Shop, description="Updated Shop.")
class Arguments:
input = ShopSettingsInput(
@@ -52,7 +52,7 @@ class ShopSettingsUpdate(BaseMutation):
)
class Meta:
- description = "Updates shop settings"
+ description = "Updates shop settings."
permissions = ("site.manage_settings",)
error_type_class = ShopError
error_type_field = "shop_errors"
@@ -71,13 +71,13 @@ class ShopSettingsUpdate(BaseMutation):
class ShopAddressUpdate(BaseMutation, I18nMixin):
- shop = graphene.Field(Shop, description="Updated Shop")
+ shop = graphene.Field(Shop, description="Updated Shop.")
class Arguments:
- input = AddressInput(description="Fields required to update shop address")
+ input = AddressInput(description="Fields required to update shop address.")
class Meta:
- description = "Update shop address"
+ description = "Update shop address."
permissions = ("site.manage_settings",)
error_type_class = ShopError
error_type_field = "shop_errors"
@@ -99,13 +99,13 @@ class ShopAddressUpdate(BaseMutation, I18nMixin):
class ShopDomainUpdate(BaseMutation):
- shop = graphene.Field(Shop, description="Updated Shop")
+ shop = graphene.Field(Shop, description="Updated Shop.")
class Arguments:
- input = SiteDomainInput(description="Fields required to update site")
+ input = SiteDomainInput(description="Fields required to update site.")
class Meta:
- description = "Updates site domain of the shop"
+ description = "Updates site domain of the shop."
permissions = ("site.manage_settings",)
error_type_class = ShopError
error_type_field = "shop_errors"
@@ -126,10 +126,10 @@ class ShopDomainUpdate(BaseMutation):
class ShopFetchTaxRates(BaseMutation):
- shop = graphene.Field(Shop, description="Updated Shop")
+ shop = graphene.Field(Shop, description="Updated Shop.")
class Meta:
- description = "Fetch tax rates"
+ description = "Fetch tax rates."
permissions = ("site.manage_settings",)
error_type_class = ShopError
error_type_field = "shop_errors"
@@ -147,13 +147,13 @@ class ShopFetchTaxRates(BaseMutation):
class HomepageCollectionUpdate(BaseMutation):
- shop = graphene.Field(Shop, description="Updated Shop")
+ shop = graphene.Field(Shop, description="Updated Shop.")
class Arguments:
- collection = graphene.ID(description="Collection displayed on homepage")
+ collection = graphene.ID(description="Collection displayed on homepage.")
class Meta:
- description = "Updates homepage collection of the shop"
+ description = "Updates homepage collection of the shop."
permissions = ("site.manage_settings",)
error_type_class = ShopError
error_type_field = "shop_errors"
@@ -181,7 +181,7 @@ class AuthorizationKeyAdd(BaseMutation):
authorization_key = graphene.Field(
AuthorizationKey, description="Newly added authorization key."
)
- shop = graphene.Field(Shop, description="Updated Shop")
+ shop = graphene.Field(Shop, description="Updated Shop.")
class Meta:
description = "Adds an authorization key."
@@ -222,7 +222,7 @@ class AuthorizationKeyDelete(BaseMutation):
authorization_key = graphene.Field(
AuthorizationKey, description="Authorization key that was deleted."
)
- shop = graphene.Field(Shop, description="Updated Shop")
+ shop = graphene.Field(Shop, description="Updated Shop.")
class Arguments:
key_type = AuthorizationKeyType(
diff --git a/saleor/graphql/shop/types.py b/saleor/graphql/shop/types.py
index b6e16ce698..b0251da0a8 100644
--- a/saleor/graphql/shop/types.py
+++ b/saleor/graphql/shop/types.py
@@ -66,7 +66,7 @@ class Shop(graphene.ObjectType):
authorization_keys = graphene.List(
AuthorizationKey,
description="""List of configured authorization keys. Authorization
- keys are used to enable third party OAuth authorization
+ keys are used to enable third-party OAuth authorization
(currently Facebook or Google).""",
required=True,
)
@@ -83,15 +83,15 @@ class Shop(graphene.ObjectType):
graphene.String, description="List of available currencies.", required=True
)
default_currency = graphene.String(
- description="Default shop's currency.", required=True
+ description="Shop's default currency.", required=True
)
default_country = graphene.Field(
- CountryDisplay, description="Default shop's country"
+ CountryDisplay, description="Shop's default country."
)
description = graphene.String(description="Shop's description.")
domain = graphene.Field(Domain, required=True, description="Shop's domain data.")
homepage_collection = graphene.Field(
- Collection, description="Collection displayed on homepage"
+ Collection, description="Collection displayed on homepage."
)
languages = graphene.List(
LanguageDisplay,
@@ -106,20 +106,20 @@ class Shop(graphene.ObjectType):
phone_prefixes = graphene.List(
graphene.String, description="List of possible phone prefixes.", required=True
)
- header_text = graphene.String(description="Header text")
+ header_text = graphene.String(description="Header text.")
include_taxes_in_prices = graphene.Boolean(
- description="Include taxes in prices", required=True
+ description="Include taxes in prices.", required=True
)
display_gross_prices = graphene.Boolean(
- description="Display prices with tax in store", required=True
+ description="Display prices with tax in store.", required=True
)
charge_taxes_on_shipping = graphene.Boolean(
- description="Charge taxes on shipping", required=True
+ description="Charge taxes on shipping.", required=True
)
track_inventory_by_default = graphene.Boolean(
- description="Enable inventory tracking"
+ description="Enable inventory tracking."
)
- default_weight_unit = WeightUnitsEnum(description="Default weight unit")
+ default_weight_unit = WeightUnitsEnum(description="Default weight unit.")
translation = graphene.Field(
ShopTranslation,
language_code=graphene.Argument(
@@ -130,23 +130,22 @@ class Shop(graphene.ObjectType):
description=("Returns translated Shop fields for the given language code."),
)
automatic_fulfillment_digital_products = graphene.Boolean(
- description="Enable automatic fulfillment for all digital products"
+ description="Enable automatic fulfillment for all digital products."
)
default_digital_max_downloads = graphene.Int(
- description="Default number of max downloads per digital content url"
+ description="Default number of max downloads per digital content URL."
)
default_digital_url_valid_days = graphene.Int(
- description=("Default number of days which digital content url will be valid")
+ description=("Default number of days which digital content URL will be valid.")
)
company_address = graphene.Field(
- Address, description="Company address", required=False
+ Address, description="Company address.", required=False
)
class Meta:
description = """
- Represents a shop resource containing general shop\'s data
- and configuration."""
+ Represents a shop resource containing general shop data and configuration."""
@staticmethod
@permission_required("site.manage_settings")
diff --git a/saleor/graphql/translations/mutations.py b/saleor/graphql/translations/mutations.py
index e065be4ba4..17a391443e 100644
--- a/saleor/graphql/translations/mutations.py
+++ b/saleor/graphql/translations/mutations.py
@@ -47,9 +47,9 @@ class TranslationInput(NameTranslationInput, SeoTranslationInput):
class CategoryTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Category ID")
+ id = graphene.ID(required=True, description="Category ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = TranslationInput(required=True)
@@ -60,9 +60,9 @@ class CategoryTranslate(BaseTranslateMutation):
class ProductTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Product ID")
+ id = graphene.ID(required=True, description="Product ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = TranslationInput(required=True)
@@ -73,9 +73,9 @@ class ProductTranslate(BaseTranslateMutation):
class CollectionTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Collection ID")
+ id = graphene.ID(required=True, description="Collection ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = TranslationInput(required=True)
@@ -86,9 +86,9 @@ class CollectionTranslate(BaseTranslateMutation):
class ProductVariantTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Product Variant ID")
+ id = graphene.ID(required=True, description="Product Variant ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = NameTranslationInput(required=True)
@@ -99,9 +99,9 @@ class ProductVariantTranslate(BaseTranslateMutation):
class AttributeTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Attribute ID")
+ id = graphene.ID(required=True, description="Attribute ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = NameTranslationInput(required=True)
@@ -112,9 +112,9 @@ class AttributeTranslate(BaseTranslateMutation):
class AttributeValueTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Attribute Value ID")
+ id = graphene.ID(required=True, description="Attribute Value ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = NameTranslationInput(required=True)
@@ -125,9 +125,9 @@ class AttributeValueTranslate(BaseTranslateMutation):
class SaleTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Voucher ID")
+ id = graphene.ID(required=True, description="Voucher ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = NameTranslationInput(required=True)
@@ -138,9 +138,9 @@ class SaleTranslate(BaseTranslateMutation):
class VoucherTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Voucher ID")
+ id = graphene.ID(required=True, description="Voucher ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = NameTranslationInput(required=True)
@@ -151,9 +151,9 @@ class VoucherTranslate(BaseTranslateMutation):
class ShippingPriceTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Shipping Method ID")
+ id = graphene.ID(required=True, description="Shipping Method ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = NameTranslationInput(required=True)
@@ -164,9 +164,9 @@ class ShippingPriceTranslate(BaseTranslateMutation):
class MenuItemTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Menu Item ID")
+ id = graphene.ID(required=True, description="Menu Item ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = NameTranslationInput(required=True)
@@ -183,9 +183,9 @@ class PageTranslationInput(SeoTranslationInput):
class PageTranslate(BaseTranslateMutation):
class Arguments:
- id = graphene.ID(required=True, description="Page ID")
+ id = graphene.ID(required=True, description="Page ID.")
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = PageTranslationInput(required=True)
@@ -200,11 +200,11 @@ class ShopSettingsTranslationInput(graphene.InputObjectType):
class ShopSettingsTranslate(BaseMutation):
- shop = graphene.Field(Shop, description="Updated Shop")
+ shop = graphene.Field(Shop, description="Updated Shop.")
class Arguments:
language_code = graphene.Argument(
- LanguageCodeEnum, required=True, description="Translation language code"
+ LanguageCodeEnum, required=True, description="Translation language code."
)
input = ShopSettingsTranslationInput(
description=("Fields required to update shop settings translations."),
diff --git a/saleor/graphql/translations/schema.py b/saleor/graphql/translations/schema.py
index 3689da8a9c..adac5234b7 100644
--- a/saleor/graphql/translations/schema.py
+++ b/saleor/graphql/translations/schema.py
@@ -59,7 +59,7 @@ class TranslatableKinds(graphene.Enum):
class TranslationQueries(graphene.ObjectType):
translations = BaseConnectionField(
TranslatableItemConnection,
- description="Returns list of all translatable items of a given kind.",
+ description="Returns a list of all translatable items of a given kind.",
kind=graphene.Argument(
TranslatableKinds, required=True, description="Kind of objects to retrieve."
),
diff --git a/saleor/graphql/translations/types.py b/saleor/graphql/translations/types.py
index 01cf47411c..64aec0a2a6 100644
--- a/saleor/graphql/translations/types.py
+++ b/saleor/graphql/translations/types.py
@@ -15,7 +15,7 @@ from .enums import LanguageCodeEnum
class BaseTranslationType(CountableDjangoObjectType):
language = graphene.Field(
- LanguageDisplay, description="Translation's language", required=True
+ LanguageDisplay, description="Translation language.", required=True
)
class Meta:
diff --git a/saleor/graphql/webhook/mutations.py b/saleor/graphql/webhook/mutations.py
index 50a27ad63d..1df374bca4 100644
--- a/saleor/graphql/webhook/mutations.py
+++ b/saleor/graphql/webhook/mutations.py
@@ -111,7 +111,7 @@ class WebhookUpdateInput(graphene.InputObjectType):
description="Determine if webhook will be set active or not.", required=False
)
secret_key = graphene.String(
- description="Use to create a hash signature with each payload", required=False
+ description="Use to create a hash signature with each payload.", required=False
)
diff --git a/saleor/graphql/webhook/schema.py b/saleor/graphql/webhook/schema.py
index 83670b3570..7fcedc5599 100644
--- a/saleor/graphql/webhook/schema.py
+++ b/saleor/graphql/webhook/schema.py
@@ -10,11 +10,11 @@ class WebhookQueries(graphene.ObjectType):
webhook = graphene.Field(
Webhook,
id=graphene.Argument(
- graphene.ID, required=True, description="ID of the webhook"
+ graphene.ID, required=True, description="ID of the webhook."
),
- description="Lookup a webhook by ID.",
+ description="Look up a webhook by ID.",
)
- webhooks = PrefetchingConnectionField(Webhook, description="List of webhooks")
+ webhooks = PrefetchingConnectionField(Webhook, description="List of webhooks.")
def resolve_webhooks(self, info, **_kwargs):
return resolve_webhooks(info)
diff --git a/saleor/graphql/webhook/types.py b/saleor/graphql/webhook/types.py
index 23eb0f8f25..c1448f87c6 100644
--- a/saleor/graphql/webhook/types.py
+++ b/saleor/graphql/webhook/types.py
@@ -6,20 +6,20 @@ from ..core.connection import CountableDjangoObjectType
class WebhookEvent(graphene.ObjectType):
- event_type = graphene.String(description="Name of the event type")
+ event_type = graphene.String(description="Name of the event type.")
class Meta:
- description = "Webhook event"
+ description = "Webhook event."
class Webhook(CountableDjangoObjectType):
events = gql_optimizer.field(
- graphene.List(WebhookEvent, description="List of webhook events"),
+ graphene.List(WebhookEvent, description="List of webhook events."),
model_field="events",
)
class Meta:
- description = "Webhook"
+ description = "Webhook."
model = models.Webhook
interfaces = [graphene.relay.Node]
only_fields = [