Explorar el Código

make black (#4235)

master
Christian Clauss hace 1 año
padre
commit
8f57e5cfae
No account linked to committer's email address

+ 3
- 3
src/oscar/apps/basket/views.py Ver fichero

350
         # if the SESSION_SERIALIZER has been configured to 'django.contrib.sessions.serializers.PickleSerializer'.
350
         # if the SESSION_SERIALIZER has been configured to 'django.contrib.sessions.serializers.PickleSerializer'.
351
         # see: https://docs.djangoproject.com/en/3.2/topics/http/sessions/#cookie-session-backend
351
         # see: https://docs.djangoproject.com/en/3.2/topics/http/sessions/#cookie-session-backend
352
         serialized_data = JSONSerializer().dumps(self.request.POST)
352
         serialized_data = JSONSerializer().dumps(self.request.POST)
353
-        self.request.session[
354
-            "add_to_basket_form_post_data_%s" % self.product.pk
355
-        ] = serialized_data.decode("latin-1")
353
+        self.request.session["add_to_basket_form_post_data_%s" % self.product.pk] = (
354
+            serialized_data.decode("latin-1")
355
+        )
356
 
356
 
357
         return redirect_to_referrer(self.request, "basket:summary")
357
         return redirect_to_referrer(self.request, "basket:summary")
358
 
358
 

+ 0
- 1
src/oscar/apps/catalogue/abstract_models.py Ver fichero

1498
 
1498
 
1499
 
1499
 
1500
 class MissingProductImage(object):
1500
 class MissingProductImage(object):
1501
-
1502
     """
1501
     """
1503
     Mimics a Django file field by having a name property.
1502
     Mimics a Django file field by having a name property.
1504
 
1503
 

+ 0
- 1
src/oscar/apps/dashboard/catalogue/views.py Ver fichero

77
 
77
 
78
 
78
 
79
 class ProductListView(PartnerProductFilterMixin, SingleTableView):
79
 class ProductListView(PartnerProductFilterMixin, SingleTableView):
80
-
81
     """
80
     """
82
     Dashboard view of the product list.
81
     Dashboard view of the product list.
83
     Supports the permission-based dashboard.
82
     Supports the permission-based dashboard.

+ 3
- 3
src/oscar/apps/dashboard/orders/views.py Ver fichero

388
 
388
 
389
     def download_selected_orders(self, request, orders):
389
     def download_selected_orders(self, request, orders):
390
         response = HttpResponse(content_type="text/csv")
390
         response = HttpResponse(content_type="text/csv")
391
-        response[
392
-            "Content-Disposition"
393
-        ] = "attachment; filename=%s" % self.get_download_filename(request)
391
+        response["Content-Disposition"] = (
392
+            "attachment; filename=%s" % self.get_download_filename(request)
393
+        )
394
         writer = UnicodeCSVWriter(open_file=response)
394
         writer = UnicodeCSVWriter(open_file=response)
395
 
395
 
396
         writer.writerow(self.CSV_COLUMNS.values())
396
         writer.writerow(self.CSV_COLUMNS.values())

+ 9
- 9
tests/integration/core/test_loading.py Ver fichero

60
         replaced_app_idx = installed_apps.index(
60
         replaced_app_idx = installed_apps.index(
61
             "tests._site.apps.catalogue.apps.CatalogueConfig"
61
             "tests._site.apps.catalogue.apps.CatalogueConfig"
62
         )
62
         )
63
-        installed_apps[
64
-            replaced_app_idx
65
-        ] = "tests._site.import_error_app.catalogue.apps.CatalogueConfig"
63
+        installed_apps[replaced_app_idx] = (
64
+            "tests._site.import_error_app.catalogue.apps.CatalogueConfig"
65
+        )
66
         with override_settings(INSTALLED_APPS=installed_apps):
66
         with override_settings(INSTALLED_APPS=installed_apps):
67
             with self.assertRaises(ImportError):
67
             with self.assertRaises(ImportError):
68
                 get_class("catalogue.import_error_module", "ImportErrorClass")
68
                 get_class("catalogue.import_error_module", "ImportErrorClass")
74
         replaced_app_idx = self.installed_apps.index(
74
         replaced_app_idx = self.installed_apps.index(
75
             "oscar.apps.shipping.apps.ShippingConfig"
75
             "oscar.apps.shipping.apps.ShippingConfig"
76
         )
76
         )
77
-        self.installed_apps[
78
-            replaced_app_idx
79
-        ] = "tests._site.apps.shipping.apps.ShippingConfig"
77
+        self.installed_apps[replaced_app_idx] = (
78
+            "tests._site.apps.shipping.apps.ShippingConfig"
79
+        )
80
 
80
 
81
     def test_loading_class_defined_in_local_module(self):
81
     def test_loading_class_defined_in_local_module(self):
82
         with override_settings(INSTALLED_APPS=self.installed_apps):
82
         with override_settings(INSTALLED_APPS=self.installed_apps):
133
         replaced_app_idx = self.installed_apps.index(
133
         replaced_app_idx = self.installed_apps.index(
134
             "oscar.apps.shipping.apps.ShippingConfig"
134
             "oscar.apps.shipping.apps.ShippingConfig"
135
         )
135
         )
136
-        self.installed_apps[
137
-            replaced_app_idx
138
-        ] = "tests._site.apps.shipping.apps.ShippingConfig"
136
+        self.installed_apps[replaced_app_idx] = (
137
+            "tests._site.apps.shipping.apps.ShippingConfig"
138
+        )
139
 
139
 
140
     def test_loading_class_defined_in_local_module(self):
140
     def test_loading_class_defined_in_local_module(self):
141
         with override_settings(INSTALLED_APPS=self.installed_apps):
141
         with override_settings(INSTALLED_APPS=self.installed_apps):

Loading…
Cancelar
Guardar