[1.11.x] Sorted imports per isort 4.2.9.

Backport of cde31daf8815e05b4b86b857b49fb0e31e1f0a38 from master
This commit is contained in:
Tim Graham 2017-06-01 13:26:37 -04:00
parent 2134090e79
commit 3cd9a4b1ea
30 changed files with 63 additions and 53 deletions

View File

@ -1,5 +1,6 @@
from django.db.backends.mysql.base import \ from django.db.backends.mysql.base import (
DatabaseWrapper as MySQLDatabaseWrapper DatabaseWrapper as MySQLDatabaseWrapper,
)
from .features import DatabaseFeatures from .features import DatabaseFeatures
from .introspection import MySQLIntrospection from .introspection import MySQLIntrospection

View File

@ -1,6 +1,7 @@
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.db.backends.mysql.features import \ from django.db.backends.mysql.features import (
DatabaseFeatures as MySQLDatabaseFeatures DatabaseFeatures as MySQLDatabaseFeatures,
)
class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures): class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures):

View File

@ -1,6 +1,7 @@
from django.contrib.gis.db.backends.base.adapter import WKTAdapter from django.contrib.gis.db.backends.base.adapter import WKTAdapter
from django.contrib.gis.db.backends.base.operations import \ from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations BaseSpatialOperations,
)
from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.db.models import GeometryField, aggregates from django.contrib.gis.db.models import GeometryField, aggregates
from django.db.backends.mysql.operations import DatabaseOperations from django.db.backends.mysql.operations import DatabaseOperations

View File

@ -1,5 +1,6 @@
from django.db.backends.oracle.base import \ from django.db.backends.oracle.base import (
DatabaseWrapper as OracleDatabaseWrapper DatabaseWrapper as OracleDatabaseWrapper,
)
from .features import DatabaseFeatures from .features import DatabaseFeatures
from .introspection import OracleIntrospection from .introspection import OracleIntrospection

View File

@ -1,6 +1,7 @@
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.db.backends.oracle.features import \ from django.db.backends.oracle.features import (
DatabaseFeatures as OracleDatabaseFeatures DatabaseFeatures as OracleDatabaseFeatures,
)
class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures): class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures):

View File

@ -9,8 +9,9 @@
""" """
import re import re
from django.contrib.gis.db.backends.base.operations import \ from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations BaseSpatialOperations,
)
from django.contrib.gis.db.backends.oracle.adapter import OracleSpatialAdapter from django.contrib.gis.db.backends.oracle.adapter import OracleSpatialAdapter
from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models import aggregates

View File

@ -1,6 +1,7 @@
from django.db.backends.base.base import NO_DB_ALIAS from django.db.backends.base.base import NO_DB_ALIAS
from django.db.backends.postgresql.base import \ from django.db.backends.postgresql.base import (
DatabaseWrapper as Psycopg2DatabaseWrapper DatabaseWrapper as Psycopg2DatabaseWrapper,
)
from .features import DatabaseFeatures from .features import DatabaseFeatures
from .introspection import PostGISIntrospection from .introspection import PostGISIntrospection

View File

@ -1,6 +1,7 @@
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.db.backends.postgresql.features import \ from django.db.backends.postgresql.features import (
DatabaseFeatures as Psycopg2DatabaseFeatures DatabaseFeatures as Psycopg2DatabaseFeatures,
)
class DatabaseFeatures(BaseSpatialFeatures, Psycopg2DatabaseFeatures): class DatabaseFeatures(BaseSpatialFeatures, Psycopg2DatabaseFeatures):

View File

@ -1,8 +1,9 @@
import re import re
from django.conf import settings from django.conf import settings
from django.contrib.gis.db.backends.base.operations import \ from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations BaseSpatialOperations,
)
from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.gdal import GDALRaster from django.contrib.gis.gdal import GDALRaster
from django.contrib.gis.measure import Distance from django.contrib.gis.measure import Distance

View File

@ -1,6 +1,7 @@
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.db.backends.sqlite3.features import \ from django.db.backends.sqlite3.features import (
DatabaseFeatures as SQLiteDatabaseFeatures DatabaseFeatures as SQLiteDatabaseFeatures,
)
from django.utils.functional import cached_property from django.utils.functional import cached_property

View File

@ -6,8 +6,9 @@ https://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.1.html
import re import re
import sys import sys
from django.contrib.gis.db.backends.base.operations import \ from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations BaseSpatialOperations,
)
from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter
from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models import aggregates

View File

@ -4,7 +4,6 @@ from django.contrib.gis.geoip.libgeoip import free, lgeoip
# #### GeoIP C Structure definitions #### # #### GeoIP C Structure definitions ####
class GeoIPRecord(Structure): class GeoIPRecord(Structure):
_fields_ = [('country_code', c_char_p), _fields_ = [('country_code', c_char_p),
('country_code3', c_char_p), ('country_code3', c_char_p),

View File

@ -1,5 +1,6 @@
from django.core.management.commands.inspectdb import \ from django.core.management.commands.inspectdb import (
Command as InspectDBCommand Command as InspectDBCommand,
)
class Command(InspectDBCommand): class Command(InspectDBCommand):

View File

@ -1,7 +1,8 @@
from django.conf import settings from django.conf import settings
from django.contrib.staticfiles.handlers import StaticFilesHandler from django.contrib.staticfiles.handlers import StaticFilesHandler
from django.core.management.commands.runserver import \ from django.core.management.commands.runserver import (
Command as RunserverCommand Command as RunserverCommand,
)
class Command(RunserverCommand): class Command(RunserverCommand):

View File

@ -5,8 +5,9 @@ import os
from django.conf import settings from django.conf import settings
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
from django.core.mail.backends.console import \ from django.core.mail.backends.console import (
EmailBackend as ConsoleEmailBackend EmailBackend as ConsoleEmailBackend,
)
from django.utils import six from django.utils import six

View File

@ -3,7 +3,6 @@ from __future__ import unicode_literals
from django.db import models from django.db import models
from django.utils import six from django.utils import six
# The models definitions below used to crash. Generating models dynamically # The models definitions below used to crash. Generating models dynamically
# at runtime is a bad idea because it pollutes the app registry. This doesn't # at runtime is a bad idea because it pollutes the app registry. This doesn't
# integrate well with the test suite but at least it prevents regressions. # integrate well with the test suite but at least it prevents regressions.

View File

@ -1,5 +1,6 @@
from django.core.checks.compatibility.django_1_10 import \ from django.core.checks.compatibility.django_1_10 import (
check_duplicate_middleware_settings check_duplicate_middleware_settings,
)
from django.test import SimpleTestCase from django.test import SimpleTestCase
from django.test.utils import override_settings from django.test.utils import override_settings

View File

@ -1,5 +1,6 @@
from django.core.checks.compatibility.django_1_8_0 import \ from django.core.checks.compatibility.django_1_8_0 import (
check_duplicate_template_settings check_duplicate_template_settings,
)
from django.test import SimpleTestCase from django.test import SimpleTestCase
from django.test.utils import override_settings from django.test.utils import override_settings

View File

@ -13,7 +13,6 @@ from .models import (
Group, Membership, NewsArticle, Person, Group, Membership, NewsArticle, Person,
) )
# Note that these tests are testing internal implementation details. # Note that these tests are testing internal implementation details.
# ForeignObject is not part of public API. # ForeignObject is not part of public API.

View File

@ -10,8 +10,9 @@ from subprocess import Popen
from django.core.management import ( from django.core.management import (
CommandError, call_command, execute_from_command_line, CommandError, call_command, execute_from_command_line,
) )
from django.core.management.commands.makemessages import \ from django.core.management.commands.makemessages import (
Command as MakeMessagesCommand Command as MakeMessagesCommand,
)
from django.core.management.utils import find_command from django.core.management.utils import find_command
from django.test import SimpleTestCase, mock, override_settings from django.test import SimpleTestCase, mock, override_settings
from django.test.utils import captured_stderr, captured_stdout from django.test.utils import captured_stderr, captured_stdout

View File

@ -14,8 +14,9 @@ from admin_scripts.tests import AdminScriptTestCase
from django.core import management from django.core import management
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line
from django.core.management.base import CommandError from django.core.management.base import CommandError
from django.core.management.commands.makemessages import \ from django.core.management.commands.makemessages import (
Command as MakeMessagesCommand Command as MakeMessagesCommand,
)
from django.core.management.utils import find_command from django.core.management.utils import find_command
from django.test import SimpleTestCase, mock, override_settings from django.test import SimpleTestCase, mock, override_settings
from django.test.utils import captured_stderr, captured_stdout from django.test.utils import captured_stderr, captured_stdout

View File

@ -16,7 +16,6 @@ from __future__ import unicode_literals
from django.db import models from django.db import models
from django.utils.encoding import python_2_unicode_compatible from django.utils.encoding import python_2_unicode_compatible
# #
# Abstract base classes # Abstract base classes
# #

View File

@ -1,6 +1,5 @@
from django.db import models from django.db import models
# Since the test database doesn't have tablespaces, it's impossible for Django # Since the test database doesn't have tablespaces, it's impossible for Django
# to create the tables for models where db_tablespace is set. To avoid this # to create the tables for models where db_tablespace is set. To avoid this
# problem, we mark the models as unmanaged, and temporarily revert them to # problem, we mark the models as unmanaged, and temporarily revert them to

View File

@ -10,8 +10,6 @@ from django.utils.encoding import python_2_unicode_compatible
from django.utils.functional import cached_property from django.utils.functional import cached_property
# Basic tests
@python_2_unicode_compatible @python_2_unicode_compatible
class Author(models.Model): class Author(models.Model):
name = models.CharField(max_length=50, unique=True) name = models.CharField(max_length=50, unique=True)

View File

@ -7,7 +7,6 @@ providing a modified interface to the data from the base class.
from django.db import models from django.db import models
from django.utils.encoding import python_2_unicode_compatible from django.utils.encoding import python_2_unicode_compatible
# A couple of managers for testing managing overriding in proxy model cases. # A couple of managers for testing managing overriding in proxy model cases.

View File

@ -14,7 +14,6 @@ from django.contrib.contenttypes.models import ContentType
from django.db import models from django.db import models
from django.utils.encoding import python_2_unicode_compatible from django.utils.encoding import python_2_unicode_compatible
# Who remembers high school biology? # Who remembers high school biology?

View File

@ -32,7 +32,6 @@ from .models import (
) )
from .tests import register_tests from .tests import register_tests
# A set of functions that can be used to recreate # A set of functions that can be used to recreate
# test data objects of various kinds. # test data objects of various kinds.
# The save method is a raw base model save, to make # The save method is a raw base model save, to make

View File

@ -10,12 +10,14 @@ from datetime import timedelta
from django.conf import settings from django.conf import settings
from django.contrib.sessions.backends.base import UpdateError from django.contrib.sessions.backends.base import UpdateError
from django.contrib.sessions.backends.cache import SessionStore as CacheSession from django.contrib.sessions.backends.cache import SessionStore as CacheSession
from django.contrib.sessions.backends.cached_db import \ from django.contrib.sessions.backends.cached_db import (
SessionStore as CacheDBSession SessionStore as CacheDBSession,
)
from django.contrib.sessions.backends.db import SessionStore as DatabaseSession from django.contrib.sessions.backends.db import SessionStore as DatabaseSession
from django.contrib.sessions.backends.file import SessionStore as FileSession from django.contrib.sessions.backends.file import SessionStore as FileSession
from django.contrib.sessions.backends.signed_cookies import \ from django.contrib.sessions.backends.signed_cookies import (
SessionStore as CookieSession SessionStore as CookieSession,
)
from django.contrib.sessions.exceptions import InvalidSessionKey from django.contrib.sessions.exceptions import InvalidSessionKey
from django.contrib.sessions.middleware import SessionMiddleware from django.contrib.sessions.middleware import SessionMiddleware
from django.contrib.sessions.models import Session from django.contrib.sessions.models import Session

View File

@ -8,8 +8,9 @@ import unittest
from django.conf import settings from django.conf import settings
from django.contrib.staticfiles import finders, storage from django.contrib.staticfiles import finders, storage
from django.contrib.staticfiles.management.commands.collectstatic import \ from django.contrib.staticfiles.management.commands.collectstatic import (
Command as CollectstaticCommand Command as CollectstaticCommand,
)
from django.core.cache.backends.base import BaseCache from django.core.cache.backends.base import BaseCache
from django.core.management import call_command from django.core.management import call_command
from django.test import override_settings from django.test import override_settings

View File

@ -6,7 +6,6 @@ is generated for the table on various manage.py operations.
from django.db import models from django.db import models
from django.utils.encoding import python_2_unicode_compatible from django.utils.encoding import python_2_unicode_compatible
# All of these models are created in the database by Django. # All of these models are created in the database by Django.