summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorRay Ashman Jr <ray.ashman.jr@gmail.com>2013-11-02 15:27:47 -0400
committerRay Ashman Jr <ray.ashman.jr@gmail.com>2013-11-02 15:27:47 -0400
commitdcfc8fa9721955dc4fcfb6e5e506be12f74c5b85 (patch)
treedb0ff9bc296501a9f8eb5f7b44e3b49652103992 /django/forms
parentb44d42be6d05e88071844b64c6519223cdd2fa80 (diff)
Correct flake8 violation E261
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/fields.py6
-rw-r--r--django/forms/forms.py8
-rw-r--r--django/forms/formsets.py4
-rw-r--r--django/forms/widgets.py8
4 files changed, 13 insertions, 13 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py
index b5816889f9..b874429c5e 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -45,9 +45,9 @@ __all__ = (
class Field(object):
- widget = TextInput # Default widget to use when rendering this type of Field.
- hidden_widget = HiddenInput # Default widget to use when rendering this as "hidden".
- default_validators = [] # Default set of validators
+ widget = TextInput # Default widget to use when rendering this type of Field.
+ hidden_widget = HiddenInput # Default widget to use when rendering this as "hidden".
+ default_validators = [] # Default set of validators
# Add an 'invalid' entry to default_error_message if you want a specific
# field error message not raised by the field validators.
default_error_messages = {
diff --git a/django/forms/forms.py b/django/forms/forms.py
index d9be2cd3f8..ddd51ffaae 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -120,7 +120,7 @@ class BaseForm(object):
# Translators: This is the default suffix added to form field labels
self.label_suffix = label_suffix if label_suffix is not None else _(':')
self.empty_permitted = empty_permitted
- self._errors = None # Stores the errors after clean() has been called.
+ self._errors = None # Stores the errors after clean() has been called.
self._changed_data = None
# The base_fields class attribute is the *class-wide* definition of
@@ -176,7 +176,7 @@ class BaseForm(object):
def _html_output(self, normal_row, error_row, row_ender, help_text_html, errors_on_separate_row):
"Helper function for outputting HTML. Used by as_table(), as_ul(), as_p()."
- top_errors = self.non_field_errors() # Errors that should be displayed above all fields.
+ top_errors = self.non_field_errors() # Errors that should be displayed above all fields.
output, hidden_fields = [], []
for name, field in self.fields.items():
@@ -223,7 +223,7 @@ class BaseForm(object):
if top_errors:
output.insert(0, error_row % force_text(top_errors))
- if hidden_fields: # Insert any hidden fields in the last row.
+ if hidden_fields: # Insert any hidden fields in the last row.
str_hidden = ''.join(hidden_fields)
if output:
last_row = output[-1]
@@ -295,7 +295,7 @@ class BaseForm(object):
self.cleaned_data.
"""
self._errors = ErrorDict()
- if not self.is_bound: # Stop further processing.
+ if not self.is_bound: # Stop further processing.
return
self.cleaned_data = {}
# If the form is permitted to be empty, and none of the form data has
diff --git a/django/forms/formsets.py b/django/forms/formsets.py
index 81e2e8781a..5b2efee82e 100644
--- a/django/forms/formsets.py
+++ b/django/forms/formsets.py
@@ -244,7 +244,7 @@ class BaseFormSet(object):
def compare_ordering_key(k):
if k[1] is None:
- return (1, 0) # +infinity, larger than any number
+ return (1, 0) # +infinity, larger than any number
return (0, k[1])
self._ordering.sort(key=compare_ordering_key)
# Return a list of form.cleaned_data dicts in the order specified by
@@ -316,7 +316,7 @@ class BaseFormSet(object):
self._errors = []
self._non_form_errors = self.error_class()
- if not self.is_bound: # Stop further processing.
+ if not self.is_bound: # Stop further processing.
return
for i in range(0, self.total_form_count()):
form = self.forms[i]
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 58bcabef98..89d8544d75 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -161,8 +161,8 @@ class SubWidget(object):
return self.parent_widget.render(*args)
class Widget(six.with_metaclass(MediaDefiningClass)):
- is_hidden = False # Determines whether this corresponds to an <input type="hidden">.
- needs_multipart_form = False # Determines does this widget need multipart form
+ is_hidden = False # Determines whether this corresponds to an <input type="hidden">.
+ needs_multipart_form = False # Determines does this widget need multipart form
is_localized = False
is_required = False
@@ -227,7 +227,7 @@ class Input(Widget):
Base class for all <input> widgets (except type='checkbox' and
type='radio', which are special).
"""
- input_type = None # Subclasses must define this.
+ input_type = None # Subclasses must define this.
def _format_value(self, value):
if self.is_localized:
@@ -643,7 +643,7 @@ class ChoiceFieldRenderer(object):
self.choices = choices
def __getitem__(self, idx):
- choice = self.choices[idx] # Let the IndexError propogate
+ choice = self.choices[idx] # Let the IndexError propogate
return self.choice_input_class(self.name, self.value, self.attrs.copy(), choice, idx)
def __str__(self):