Skip to content

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

Fix line length and typo

Mateusz Dereniowski4a0a99636b71
diff --git a/.isort.cfg b/.isort.cfg
index 20d12ef055..fcfb25ad82 100644
--- a/.isort.cfg
+++ b/.isort.cfg
@@ -1,2 +1,2 @@
[settings]
-known_third_party = PIL,babel,bleach,bootstrap4,braintree,bs4,captcha,celery,dj_database_url,dj_email_url,django,django_babel,django_cache_url,django_countries,django_elasticsearch_dsl,django_filters,django_measurement,django_prices,django_prices_openexchangerates,django_prices_vatlayer,draftjs_sanitizer,elasticsearch_dsl,faker,freezegun,geolite2,google_measurement_protocol,graphene,graphene_django,graphene_django_optimizer,graphql,graphql_jwt,graphql_relay,html5lib,html_to_draftjs,i18naddress,impersonate,markdown,measurement,mptt,phonenumber_field,phonenumbers,prices,promise,pytest,razorpay,requests,sentry_sdk,six,social_core,storages,stripe,templated_email,text_unidecode,versatileimagefield
+known_third_party = PIL,babel,bleach,bootstrap4,braintree,bs4,captcha,celery,dataclasses,dj_database_url,dj_email_url,django,django_babel,django_cache_url,django_countries,django_elasticsearch_dsl,django_filters,django_measurement,django_prices,django_prices_openexchangerates,django_prices_vatlayer,draftjs_sanitizer,elasticsearch_dsl,faker,freezegun,geolite2,google_measurement_protocol,graphene,graphene_django,graphene_django_optimizer,graphql,graphql_jwt,graphql_relay,html5lib,html_to_draftjs,i18naddress,impersonate,markdown,measurement,mptt,phonenumber_field,phonenumbers,prices,promise,pytest,razorpay,requests,sentry_sdk,six,social_core,storages,stripe,templated_email,tests,text_unidecode,versatileimagefield
diff --git a/saleor/product/filters.py b/saleor/product/filters.py
index cd90f448d5..970d0b0cb5 100644
--- a/saleor/product/filters.py
+++ b/saleor/product/filters.py
@@ -12,7 +12,10 @@ from .models import Attribute, Product
SORT_BY_FIELDS = OrderedDict(
[
("name", pgettext_lazy("Product list sorting option", "name")),
- ("minimal_variant_price", pgettext_lazy("Product list sorting option", "price")),
+ (
+ "minimal_variant_price",
+ pgettext_lazy("Product list sorting option", "price"),
+ ),
("updated_at", pgettext_lazy("Product list sorting option", "last updated")),
]
)
diff --git a/saleor/settings.py b/saleor/settings.py
index 184f0ba0ed..c45a67e29c 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -498,7 +498,7 @@ LOGOUT_ON_PASSWORD_CHANGE = False
# SEARCH CONFIGURATION
DB_SEARCH_ENABLED = True
-# support deployment-dependant elastic enviroment variable
+# support deployment-dependant elastic environment variable
ES_URL = (
os.environ.get("ELASTICSEARCH_URL")
or os.environ.get("SEARCHBOX_URL")
diff --git a/tests/test_product.py b/tests/test_product.py
index b49845768b..e743f5f953 100644
--- a/tests/test_product.py
+++ b/tests/test_product.py
@@ -500,7 +500,9 @@ def test_product_filter_product_does_not_exist(authorized_client, product, categ
def test_product_filter_form(authorized_client, product, category):
products = (
- models.Product.objects.all().filter(category__name=category).order_by("-minimal_variant_price")
+ models.Product.objects.all()
+ .filter(category__name=category)
+ .order_by("-minimal_variant_price")
)
url = reverse(
"product:category", kwargs={"slug": category.slug, "category_id": category.pk}
@@ -853,7 +855,8 @@ def test_product_json_deserialization(category, product_type):
"description": "Future almost cup national",
"category": {category_pk},
"price": {{"_type": "Money", "amount": "35.98", "currency": "USD"}},
- "minimal_variant_price": {{"_type": "Money", "amount": "35.98", "currency": "USD"}},
+ "minimal_variant_price":
+ {{"_type": "Money", "amount": "35.98", "currency": "USD"}},
"publication_date": null,
"is_published": true,
"attributes": "{{\\"9\\": \\"24\\", \\"10\\": \\"26\\"}}",