Skip to content

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

Fix PEP8

akjanikb2e2ccb40208
diff --git a/saleor/userprofile/i18n.py b/saleor/userprofile/i18n.py
index 7a7d85e12b..3350841e12 100644
--- a/saleor/userprofile/i18n.py
+++ b/saleor/userprofile/i18n.py
@@ -24,7 +24,8 @@ COUNTRY_FORMS = {}
UNKNOWN_COUNTRIES = set()
phone_prefixes = [
- ('+{}'.format(k),'+{}'.format(k)) for (k, v) in COUNTRY_CODE_TO_REGION_CODE.items()]
+ ('+{}'.format(k), '+{}'.format(k)) for
+ (k, v) in COUNTRY_CODE_TO_REGION_CODE.items()]
AREA_TYPE_TRANSLATIONS = {
'area': pgettext_lazy('Address field', 'Area'),
@@ -56,8 +57,7 @@ class CustomPhonePrefix(PhonePrefixSelect):
if initial:
self.initial = phone_prefixes[initial]
- super(PhonePrefixSelect, self).__init__(
- choices=sorted(choices, key=lambda item: item[1]))
+ super(PhonePrefixSelect, self).__init__(choices=choices)
class PhonePrefixWidget(PhoneNumberPrefixWidget):
@@ -99,7 +99,6 @@ class AddressForm(forms.ModelForm):
('email', 'email')
)
-
class Meta:
model = Address
exclude = []