summaryrefslogtreecommitdiff
path: root/django/db/models
diff options
context:
space:
mode:
authorcoagulant <baryshev@gmail.com>2013-11-03 01:02:56 +0400
committerTim Graham <timograham@gmail.com>2013-11-02 18:20:39 -0400
commit3bc0d46a840f17dce561daca8a6b8690b2cf5d0a (patch)
treec25954abbde0c4c06af7f862effcd351047cddf9 /django/db/models
parent2a03a9a9a1c4517be75e72899e545b0bc9dd0688 (diff)
Fixed all E261 warnings
Diffstat (limited to 'django/db/models')
-rw-r--r--django/db/models/__init__.py2
-rw-r--r--django/db/models/base.py2
-rw-r--r--django/db/models/fields/__init__.py2
-rw-r--r--django/db/models/query.py8
-rw-r--r--django/db/models/sql/query.py2
5 files changed, 8 insertions, 8 deletions
diff --git a/django/db/models/__init__.py b/django/db/models/__init__.py
index cf219d39aa..13785ed17a 100644
--- a/django/db/models/__init__.py
+++ b/django/db/models/__init__.py
@@ -11,7 +11,7 @@ from django.db.models.base import Model # NOQA
from django.db.models.aggregates import * # NOQA
from django.db.models.fields import * # NOQA
from django.db.models.fields.subclassing import SubfieldBase # NOQA
-from django.db.models.fields.files import FileField, ImageField # NOQA
+from django.db.models.fields.files import FileField, ImageField # NOQA
from django.db.models.fields.related import ( # NOQA
ForeignKey, ForeignObject, OneToOneField, ManyToManyField,
ManyToOneRel, ManyToManyRel, OneToOneRel)
diff --git a/django/db/models/base.py b/django/db/models/base.py
index 73df8633ca..ce3f095055 100644
--- a/django/db/models/base.py
+++ b/django/db/models/base.py
@@ -280,7 +280,7 @@ class ModelBase(type):
def copy_managers(cls, base_managers):
# This is in-place sorting of an Options attribute, but that's fine.
base_managers.sort()
- for _, mgr_name, manager in base_managers: # NOQA (redefinition of _)
+ for _, mgr_name, manager in base_managers: # NOQA (redefinition of _)
val = getattr(cls, mgr_name, None)
if not val or val is manager:
new_manager = manager._copy_to_model(cls)
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index 022de52134..dec2e2dd9e 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -93,7 +93,7 @@ class Field(object):
# creates, creation_counter is used for all user-specified fields.
creation_counter = 0
auto_creation_counter = -1
- default_validators = [] # Default set of validators
+ default_validators = [] # Default set of validators
default_error_messages = {
'invalid_choice': _('Value %(value)r is not a valid choice.'),
'null': _('This field cannot be null.'),
diff --git a/django/db/models/query.py b/django/db/models/query.py
index ca49f67712..5bfa68b071 100644
--- a/django/db/models/query.py
+++ b/django/db/models/query.py
@@ -1627,16 +1627,16 @@ def prefetch_related_objects(result_cache, related_lookups):
from a QuerySet
"""
if len(result_cache) == 0:
- return # nothing to do
+ return # nothing to do
# We need to be able to dynamically add to the list of prefetch_related
# lookups that we look up (see below). So we need some book keeping to
# ensure we don't do duplicate work.
- done_lookups = set() # list of lookups like foo__bar__baz
+ done_lookups = set() # list of lookups like foo__bar__baz
done_queries = {} # dictionary of things like 'foo__bar': [results]
- auto_lookups = [] # we add to this as we go through.
- followed_descriptors = set() # recursion protection
+ auto_lookups = [] # we add to this as we go through.
+ followed_descriptors = set() # recursion protection
all_lookups = itertools.chain(related_lookups, auto_lookups)
for lookup in all_lookups:
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 46a308f5ce..988b8bc644 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -146,7 +146,7 @@ class Query(object):
# The _aggregates will be an OrderedDict when used. Due to the cost
# of creating OrderedDict this attribute is created lazily (in
# self.aggregates property).
- self._aggregates = None # Maps alias -> SQL aggregate function
+ self._aggregates = None # Maps alias -> SQL aggregate function
self.aggregate_select_mask = None
self._aggregate_select_cache = None