1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed all E226 violations

This commit is contained in:
Alex Gaynor
2013-11-03 10:08:55 -08:00
parent 7288e1b02b
commit c347f78cc1
51 changed files with 150 additions and 150 deletions

View File

@@ -62,7 +62,7 @@ class SelectDateWidget(Widget):
self.years = years
else:
this_year = datetime.date.today().year
self.years = range(this_year, this_year+10)
self.years = range(this_year, this_year + 10)
# Optional dict of months to use in the "month" select box.
if months:

View File

@@ -363,7 +363,7 @@ class BaseFormSet(object):
if self.can_order:
# Only pre-fill the ordering field for initial forms.
if index is not None and index < self.initial_form_count():
form.fields[ORDERING_FIELD_NAME] = IntegerField(label=_('Order'), initial=index+1, required=False)
form.fields[ORDERING_FIELD_NAME] = IntegerField(label=_('Order'), initial=index + 1, required=False)
else:
form.fields[ORDERING_FIELD_NAME] = IntegerField(label=_('Order'), required=False)
if self.can_delete:

View File

@@ -572,7 +572,7 @@ class BaseModelFormSet(BaseFormSet):
if i >= self.initial_form_count() and self.initial_extra:
# Set initial values for extra forms
try:
kwargs['initial'] = self.initial_extra[i-self.initial_form_count()]
kwargs['initial'] = self.initial_extra[i - self.initial_form_count()]
except IndexError:
pass
return super(BaseModelFormSet, self)._construct_form(i, **kwargs)