Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix code style
akjanik3511b620ca8e
diff --git a/saleor/product/filters.py b/saleor/product/filters.pyindex 4690e1f09e..d7134810af 100644--- a/saleor/product/filters.py+++ b/saleor/product/filters.py@@ -108,5 +108,5 @@ class ProductCollectionFilter(ProductFilter):return Q(**{'product_types__products__collections': self.collection})def _get_variant_attributes_lookup(self):- return Q(**{'product_variant_types__products__collections':- self.collection})+ return Q(+ **{'product_variant_types__products__collections': self.collection})diff --git a/templates/product/product_list_base.html b/templates/product/product_list_base.htmlindex 8128ece705..6ec257985e 100644--- a/templates/product/product_list_base.html+++ b/templates/product/product_list_base.html@@ -38,60 +38,60 @@</ul></div><div class="col-md-5">- <div class="sort-by">- <div class="click-area d-none"></div>- <button class="btn btn-link">- <div>- <span>- {% if now_sorted_by == 'name' %}- {% blocktrans trimmed %}- Sort by: <b>name</b>- {% endblocktrans %}- {% elif now_sorted_by == 'price' %}- {% blocktrans trimmed %}- Sort by: <b>price</b>- {% endblocktrans %}- {% endif %}- </span>- <div class="sort-order-icon">- {% if is_descending %}- <svg data-src="{% static "images/arrow-down.svg" %}" />- {% else %}- <svg data-src="{% static "images/arrow-up.svg" %}" />- {% endif %}- </div>+ <div class="sort-by">+ <div class="click-area d-none"></div>+ <button class="btn btn-link">+ <div>+ <span>+ {% if now_sorted_by == 'name' %}+ {% blocktrans trimmed %}+ Sort by: <b>name</b>+ {% endblocktrans %}+ {% elif now_sorted_by == 'price' %}+ {% blocktrans trimmed %}+ Sort by: <b>price</b>+ {% endblocktrans %}+ {% endif %}+ </span>+ <div class="sort-order-icon">+ {% if is_descending %}+ <svg data-src="{% static "images/arrow-down.svg" %}" />+ {% else %}+ <svg data-src="{% static "images/arrow-up.svg" %}" />+ {% endif %}</div>- </button>- <ul class="sort-list d-none">- {% for choice, label in sort_by_choices.items %}- <li>- <div class="row">- <div class="col-6">- {% trans 'Sort by' context 'Product list filters' %}:- <strong>{{ label }}</strong>- </div>- <div class="col-6">- <div>- <a href="{% get_sort_by_url choice %}">- <span>{% trans 'ascending' context 'sort by option' %}</span>- <div class="sort-order-icon float-right">- <img class="lazyload lazypreload" data-src="{% static "images/arrow-up.svg" %}">- </div>- </a>- <a href="{% get_sort_by_url choice descending=True %}">- <span>{% trans 'descending' context 'sort by option' %}</span>- <div class="sort-order-icon float-right">- <img class="lazyload lazypreload" data-src="{% static "images/arrow-down.svg" %}">- </div>- </a>- </div>+ </div>+ </button>+ <ul class="sort-list d-none">+ {% for choice, label in sort_by_choices.items %}+ <li>+ <div class="row">+ <div class="col-6">+ {% trans 'Sort by' context 'Product list filters' %}:+ <strong>{{ label }}</strong>+ </div>+ <div class="col-6">+ <div>+ <a href="{% get_sort_by_url choice %}">+ <span>{% trans 'ascending' context 'sort by option' %}</span>+ <div class="sort-order-icon float-right">+ <img class="lazyload lazypreload" data-src="{% static "images/arrow-up.svg" %}">+ </div>+ </a>+ <a href="{% get_sort_by_url choice descending=True %}">+ <span>{% trans 'descending' context 'sort by option' %}</span>+ <div class="sort-order-icon float-right">+ <img class="lazyload lazypreload" data-src="{% static "images/arrow-down.svg" %}">+ </div>+ </a></div></div>- </li>- {% endfor %}- </ul>- </div>- </div>+ </div>+ </li>+ {% endfor %}+ </ul>+ </div>+ </div></div>{% endblock %}@@ -129,7 +129,6 @@</div></div></div>-</div></div>{% endblock content %}diff --git a/tests/conftest.py b/tests/conftest.pyindex 995210b9fb..1852da8324 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -645,5 +645,5 @@ def closed_orders(billing_address):@pytest.fixturedef collection(db):- collection = Collection.objects.create(name="Collection", slug='collection')+ collection = Collection.objects.create(name='Collection', slug='collection')return collectiondiff --git a/tests/test_collection.py b/tests/test_collection.pyindex 6585401700..10c5eba6e1 100644--- a/tests/test_collection.py+++ b/tests/test_collection.py@@ -85,6 +85,7 @@ def test_collection_delete_view(admin_client, collection):def test_collection_index_in_storefront(admin_client, collection):response = admin_client.get(- reverse('product:collection',- kwargs={'pk': collection.id, 'slug': collection.slug}))+ reverse(+ 'product:collection', kwargs={+ 'pk': collection.id, 'slug': collection.slug}))assert response.status_code == 200