Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Apply code review suggestions
IKarbowiak63b7e556d6cc
diff --git a/saleor/graphql/csv/enums.py b/saleor/graphql/csv/enums.pyindex 37288c3971..1ff9c39d19 100644--- a/saleor/graphql/csv/enums.py+++ b/saleor/graphql/csv/enums.py@@ -9,5 +9,17 @@ class ExportScope(graphene.Enum):IDS = "ids"FILTER = "filter"+ @property+ def description(self):+ # pylint: disable=no-member+ description_mapping = {+ ExportScope.ALL.name: "Export all products.",+ ExportScope.IDS.name: "Export products with given ids.",+ ExportScope.FILTER.name: "Export the filtered products.",+ }+ if self.name in description_mapping:+ return description_mapping[self.name]+ raise ValueError("Unsupported enum value: %s" % self.value)+JobStatusEnum = to_enum(JobStatus)diff --git a/saleor/graphql/csv/types.py b/saleor/graphql/csv/types.pyindex 37ec7cfb87..c27c5aaa46 100644--- a/saleor/graphql/csv/types.py+++ b/saleor/graphql/csv/types.py@@ -1,6 +1,5 @@import graphenefrom graphene import relay-from graphene_federation import keyfrom graphql_jwt.exceptions import PermissionDeniedfrom ...core.permissions import AccountPermissions@@ -9,13 +8,12 @@ from ..core.connection import CountableDjangoObjectTypefrom .enums import JobStatusEnum-@key(fields="id")class Job(CountableDjangoObjectType):url = graphene.String(description="The URL of field to download.")status = JobStatusEnum(description="Job status.")class Meta:- description = "Represents job data"+ description = "Represents a data export job."interfaces = [relay.Node]model = models.Jobonly_fields = [diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 396cf226c9..de190f9587 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -5093,7 +5093,7 @@ type WishlistRemoveProductVariantMutation {scalar _Any-union _Entity = Address | ServiceAccount | User | Group | ProductVariant | Product | ProductType | Collection | Category | ProductImage | Job+union _Entity = Address | ServiceAccount | User | Group | ProductVariant | Product | ProductType | Collection | Category | ProductImagetype _Service {sdl: String