diff options
| author | Christopher Medrela <chris.medrela@gmail.com> | 2013-11-26 10:43:46 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-11-28 08:50:11 -0500 |
| commit | 7477a4ffde4781f4e84503e66d7f775074089887 (patch) | |
| tree | d3bbeaa6e808deb92c0fb86cf4ae8163539d84b1 /django/db/models/sql | |
| parent | d1df395f3ae768e495a105db2f85352c44ba1c28 (diff) | |
Fixed E125 pep8 warnings
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/query.py | 8 | ||||
| -rw-r--r-- | django/db/models/sql/subqueries.py | 2 | ||||
| -rw-r--r-- | django/db/models/sql/where.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index e0593ef0a7..5f24e488cb 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -994,9 +994,9 @@ class Query(object): raise FieldError("Cannot compute %s('%s'): '%s' is an aggregate" % ( aggregate.name, field_name, field_name)) elif ((len(field_list) > 1) or - (field_list[0] not in [i.name for i in opts.fields]) or - self.group_by is None or - not is_summary): + (field_list[0] not in [i.name for i in opts.fields]) or + self.group_by is None or + not is_summary): # If: # - the field descriptor has more than one part (foo__bar), or # - the field descriptor is referencing an m2m/m2o field, or @@ -1906,7 +1906,7 @@ class Query(object): # is_nullable() is needed to the compiler stage, but that is not easy # to do currently. if ((connections[DEFAULT_DB_ALIAS].features.interprets_empty_strings_as_nulls) - and field.empty_strings_allowed): + and field.empty_strings_allowed): return True else: return field.null diff --git a/django/db/models/sql/subqueries.py b/django/db/models/sql/subqueries.py index 79db1ad99a..e9e292e787 100644 --- a/django/db/models/sql/subqueries.py +++ b/django/db/models/sql/subqueries.py @@ -61,7 +61,7 @@ class DeleteQuery(Query): innerq_used_tables = [t for t in innerq.tables if innerq.alias_refcount[t]] if ((not innerq_used_tables or innerq_used_tables == self.tables) - and not len(innerq.having)): + and not len(innerq.having)): # There is only the base table in use in the query, and there is # no aggregate filtering going on. self.where = innerq.where diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py index 7b71580370..44a4ce9d1d 100644 --- a/django/db/models/sql/where.py +++ b/django/db/models/sql/where.py @@ -69,7 +69,7 @@ class WhereNode(tree.Node): # and empty values need special handling. Other types could be used # here in the future (using Python types is suggested for consistency). if (isinstance(value, datetime.datetime) - or (isinstance(obj.field, DateTimeField) and lookup_type != 'isnull')): + or (isinstance(obj.field, DateTimeField) and lookup_type != 'isnull')): value_annotation = datetime.datetime elif hasattr(value, 'value_annotation'): value_annotation = value.value_annotation @@ -207,7 +207,7 @@ class WhereNode(tree.Node): params = field_params + params if (len(params) == 1 and params[0] == '' and lookup_type == 'exact' - and connection.features.interprets_empty_strings_as_nulls): + and connection.features.interprets_empty_strings_as_nulls): lookup_type = 'isnull' value_annotation = True |
