summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorAlasdair Nicol <alasdair@thenicols.net>2013-10-20 00:33:10 +0100
committerTim Graham <timograham@gmail.com>2013-10-21 08:31:30 -0400
commitb289fcf1bfeaa717ed465b2529a275b61dc02d92 (patch)
tree1b43958bb74005ccb93f3cd12ce4bc13d9747ab2 /django/forms
parenta3690168cbde5e7bee16443569ad3dedd2466af7 (diff)
Fixed #21288 -- Fixed E126 pep8 warnings
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/models.py6
-rw-r--r--django/forms/widgets.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 820a30b667..56e94fe9e7 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -687,7 +687,7 @@ class BaseModelFormSet(BaseFormSet):
else:
return ugettext("Please correct the duplicate data for %(field)s, "
"which must be unique.") % {
- "field": get_text_list(unique_check, six.text_type(_("and"))),
+ "field": get_text_list(unique_check, six.text_type(_("and"))),
}
def get_date_error_message(self, date_check):
@@ -1042,8 +1042,8 @@ class ModelChoiceIterator(object):
yield self.choice(obj)
def __len__(self):
- return len(self.queryset) +\
- (1 if self.field.empty_label is not None else 0)
+ return (len(self.queryset) +
+ (1 if self.field.empty_label is not None else 0))
def choice(self, obj):
return (self.field.prepare_value(obj), self.field.label_from_instance(obj))
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 2878a369e0..e6f10dd37b 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -62,9 +62,9 @@ class Media(object):
# We need to sort the keys, and iterate over the sorted list.
media = sorted(self._css.keys())
return chain(*[
- [format_html('<link href="{0}" type="text/css" media="{1}" rel="stylesheet" />', self.absolute_path(path), medium)
- for path in self._css[medium]]
- for medium in media])
+ [format_html('<link href="{0}" type="text/css" media="{1}" rel="stylesheet" />', self.absolute_path(path), medium)
+ for path in self._css[medium]]
+ for medium in media])
def absolute_path(self, path, prefix=None):
if path.startswith(('http://', 'https://', '/')):