From a8b70d251d238b4e6cfc7bb4296da15494f8dff3 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 9 Feb 2015 13:19:34 -0500 Subject: [1.8.x] Sorted imports with isort; refs #23860. Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master --- django/db/models/sql/query.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'django/db/models/sql/query.py') diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 4fb22149d0..f99b58b84f 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -6,28 +6,31 @@ themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get the information it needs. """ -from string import ascii_uppercase -from itertools import count, product - -from collections import Mapping, OrderedDict import copy -from itertools import chain import warnings +from collections import Mapping, OrderedDict +from itertools import chain, count, product +from string import ascii_uppercase from django.core.exceptions import FieldDoesNotExist, FieldError -from django.db import connections, DEFAULT_DB_ALIAS +from django.db import DEFAULT_DB_ALIAS, connections from django.db.models.aggregates import Count from django.db.models.constants import LOOKUP_SEP from django.db.models.expressions import Col, Ref -from django.db.models.query_utils import PathInfo, Q, refs_aggregate -from django.db.models.sql.constants import (QUERY_TERMS, ORDER_DIR, SINGLE, - ORDER_PATTERN, INNER, LOUTER) +from django.db.models.query_utils import Q, PathInfo, refs_aggregate +from django.db.models.sql.constants import ( + INNER, LOUTER, ORDER_DIR, ORDER_PATTERN, QUERY_TERMS, SINGLE, +) from django.db.models.sql.datastructures import ( - EmptyResultSet, Empty, MultiJoin, Join, BaseTable) -from django.db.models.sql.where import (WhereNode, Constraint, EverythingNode, - ExtraWhere, AND, OR, EmptyWhere) + BaseTable, Empty, EmptyResultSet, Join, MultiJoin, +) +from django.db.models.sql.where import ( + AND, OR, Constraint, EmptyWhere, EverythingNode, ExtraWhere, WhereNode, +) from django.utils import six -from django.utils.deprecation import RemovedInDjango19Warning, RemovedInDjango20Warning +from django.utils.deprecation import ( + RemovedInDjango19Warning, RemovedInDjango20Warning, +) from django.utils.encoding import force_text from django.utils.tree import Node -- cgit v1.3