Skip to content

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

Fix descriptions and code warnings

Mateusz Dereniowski644787320a04
diff --git a/saleor/graphql/wishlist/mutations.py b/saleor/graphql/wishlist/mutations.py
index fe3d5206d9..0fc70f356f 100644
--- a/saleor/graphql/wishlist/mutations.py
+++ b/saleor/graphql/wishlist/mutations.py
@@ -9,16 +9,16 @@ from .types import WishlistItem
class WishlistAddProductVariantMutation(BaseMutation):
wishlist_items = graphene.List(
- WishlistItem, description="The list of WishlistItems of the current user."
+ WishlistItem, description="The wishlist of the current user."
)
class Arguments:
variant_id = graphene.ID(
- description="The ID of the ProductVariant.", required=True
+ description="The ID of the product variant.", required=True
)
class Meta:
- description = "Add ProductVariant to the current user's Wishlist."
+ description = "Add product variant to the current user's wishlist."
error_type_class = WishlistError
error_type_field = "wishlist_errors"
@@ -35,16 +35,16 @@ class WishlistAddProductVariantMutation(BaseMutation):
class WishlistRemoveProductVariantMutation(BaseMutation):
wishlist_items = graphene.List(
- WishlistItem, description="The list of WishlistItems of the current user."
+ WishlistItem, description="The wishlist of the current user."
)
class Arguments:
variant_id = graphene.ID(
- description="The ID of the ProductVariant.", required=True
+ description="The ID of the product variant.", required=True
)
class Meta:
- description = "Remove ProductVariant from the current user's wishlist."
+ description = "Remove product variant from the current user's wishlist."
error_type_class = WishlistError
error_type_field = "wishlist_errors"
diff --git a/saleor/graphql/wishlist/schema.py b/saleor/graphql/wishlist/schema.py
index 7c8f446017..6c05d76fad 100644
--- a/saleor/graphql/wishlist/schema.py
+++ b/saleor/graphql/wishlist/schema.py
@@ -14,7 +14,7 @@ class WishlistQueries(graphene.ObjectType):
WishlistItem, description="Get wishlist items of the current user."
)
- def resolve_wishlist_items(self, info, **kwargs):
+ def resolve_wishlist_items(self, info, **_kwargs):
return resolve_wishlist_items(info)
diff --git a/saleor/wishlist/models.py b/saleor/wishlist/models.py
index 4b9bb5e741..4bc5f04036 100644
--- a/saleor/wishlist/models.py
+++ b/saleor/wishlist/models.py
@@ -33,7 +33,7 @@ class Wishlist(models.Model):
).distinct()
def add_variant(self, variant: ProductVariant):
- item, is_created = self.items.get_or_create(product_id=variant.product_id)
+ item, _is_created = self.items.get_or_create(product_id=variant.product_id)
item.variants.add(variant)
return item