Skip to content

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

fixing missed files black style and flake8 issue

MahmoudRizk618e5131c0f2
diff --git a/saleor/dashboard/discount/forms.py b/saleor/dashboard/discount/forms.py
index bf2d22184c..59c5b08528 100644
--- a/saleor/dashboard/discount/forms.py
+++ b/saleor/dashboard/discount/forms.py
@@ -169,7 +169,7 @@ class ProductVoucherForm(CommonVoucherForm):
class Meta:
model = Voucher
- fields = ['products', 'apply_once_per_order', 'min_amount_spent']
+ fields = ["products", "apply_once_per_order", "min_amount_spent"]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -180,8 +180,8 @@ class ProductVoucherForm(CommonVoucherForm):
class CollectionVoucherForm(CommonVoucherForm):
class Meta:
model = Voucher
- fields = ['collections', 'apply_once_per_order', 'min_amount_spent']
- labels = {'collections': pgettext_lazy('Collections', 'Collections')}
+ fields = ["collections", "apply_once_per_order", "min_amount_spent"]
+ labels = {"collections": pgettext_lazy("Collections", "Collections")}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -197,4 +197,4 @@ class CategoryVoucherForm(CommonVoucherForm):
class Meta:
model = Voucher
- fields = ['categories', 'apply_once_per_order', 'min_amount_spent']
+ fields = ["categories", "apply_once_per_order", "min_amount_spent"]
diff --git a/tests/test_discounts.py b/tests/test_discounts.py
index a56215ab87..ba084b0000 100644
--- a/tests/test_discounts.py
+++ b/tests/test_discounts.py
@@ -1,8 +1,9 @@
from datetime import date, timedelta
-import pytest
from prices import Money, TaxedMoney
+import pytest
+
from saleor.checkout.utils import get_voucher_discount_for_checkout
from saleor.discount import DiscountValueType, VoucherType
from saleor.discount.models import NotApplicable, Sale, Voucher
@@ -15,7 +16,6 @@ from saleor.discount.utils import (
increase_voucher_usage,
)
from saleor.product.models import Product, ProductVariant
-from saleor.product.models import Collection
def get_min_amount_spent(min_amount_spent):