summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-10-11 07:25:14 -0400
committerTim Graham <timograham@gmail.com>2013-10-11 07:25:14 -0400
commitb67ab75e82ec59dd4eeca119eeaf570d7c88556c (patch)
tree45bb072d08b4d7de7e6b76bf01fcd9bddcb43acd /django/forms
parent695bc0d191c126a948a7cf3acc3e37d9377ebd20 (diff)
Fixed assorted flake8 errors.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/fields.py2
-rw-r--r--django/forms/widgets.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py
index 4e0ee29938..b5816889f9 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -567,7 +567,7 @@ class FileField(Field):
raise ValidationError(self.error_messages['invalid'], code='invalid')
if self.max_length is not None and len(file_name) > self.max_length:
- params = {'max': self.max_length, 'length': len(file_name)}
+ params = {'max': self.max_length, 'length': len(file_name)}
raise ValidationError(self.error_messages['max_length'], code='max_length', params=params)
if not file_name:
raise ValidationError(self.error_messages['invalid'], code='invalid')
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 678b963e7e..f8246d60bf 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -117,7 +117,7 @@ def media_property(cls):
if definition:
extend = getattr(definition, 'extend', True)
if extend:
- if extend == True:
+ if extend is True:
m = base
else:
m = Media()