Skip to content

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

PEP8 adjustments

Pacu2f86fa21639fb
diff --git a/manage.py b/manage.py
index cf4c30557f..60bc8e75a7 100755
--- a/manage.py
+++ b/manage.py
@@ -1,6 +1,6 @@
+#!/usr/bin/env python
from __future__ import unicode_literals
-#!/usr/bin/env python
import os
import sys
diff --git a/saleor/checkout/forms.py b/saleor/checkout/forms.py
index 7e466803fd..b8118266bb 100644
--- a/saleor/checkout/forms.py
+++ b/saleor/checkout/forms.py
@@ -1,6 +1,6 @@
+"""Checkout-related forms."""
from __future__ import unicode_literals
-"""Checkout-related forms."""
from django import forms
from django.utils.safestring import mark_safe
from django.utils.translation import pgettext_lazy
diff --git a/saleor/dashboard/order/utils.py b/saleor/dashboard/order/utils.py
index e6779c3409..70e8f772cf 100644
--- a/saleor/dashboard/order/utils.py
+++ b/saleor/dashboard/order/utils.py
@@ -1,6 +1,6 @@
from __future__ import unicode_literals
-from django.conf import settings.STATIC_URL
+from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.template.loader import get_template
diff --git a/saleor/dashboard/product/views.py b/saleor/dashboard/product/views.py
index 3aff6accd6..913639e95e 100644
--- a/saleor/dashboard/product/views.py
+++ b/saleor/dashboard/product/views.py
@@ -572,7 +572,9 @@ def attribute_choice_value_delete(request, attribute_pk, value_pk):
def stock_location_list(request):
stock_locations = StockLocation.objects.all().order_by('name')
stock_locations = get_paginator_items(
- stock_locations, settings.DASHBOARD_PAGINATE_BY, request.GET.get('page'))
+ stock_locations,
+ settings.DASHBOARD_PAGINATE_BY,
+ request.GET.get('page'))
ctx = {'locations': stock_locations}
return TemplateResponse(
request,
diff --git a/saleor/site/patch_sites.py b/saleor/site/patch_sites.py
index e93ad4dbc5..3bc432cf28 100644
--- a/saleor/site/patch_sites.py
+++ b/saleor/site/patch_sites.py
@@ -1,5 +1,3 @@
-from __future__ import unicode_literals
-
'''
Since django.contrib.sites may not be thread-safe when there are
multiple instances of the application server, we're patching it with
diff --git a/saleor/wsgi/__init__.py b/saleor/wsgi/__init__.py
index 5db908d4f1..5ad2564cdc 100644
--- a/saleor/wsgi/__init__.py
+++ b/saleor/wsgi/__init__.py
@@ -1,5 +1,3 @@
-from __future__ import unicode_literals
-
"""
WSGI config for saleor project.
@@ -15,6 +13,8 @@ middleware here, or combine a Django application with an application of another
framework.
"""
+from __future__ import unicode_literals
+
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'saleor.settings')