Sorted imports per isort 4.2.9.

This commit is contained in:
Tim Graham 2017-06-01 13:23:48 -04:00 committed by GitHub
parent 4ef093b0b4
commit cde31daf88
28 changed files with 63 additions and 52 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

@ -5,8 +5,9 @@ https://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.1.html
""" """
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.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

@ -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,
)
class EmailBackend(ConsoleEmailBackend): class EmailBackend(ConsoleEmailBackend):

View File

@ -8,10 +8,12 @@ from django.db import DEFAULT_DB_ALIAS, connection, connections
from django.db.backends.base.creation import ( from django.db.backends.base.creation import (
TEST_DATABASE_PREFIX, BaseDatabaseCreation, TEST_DATABASE_PREFIX, BaseDatabaseCreation,
) )
from django.db.backends.mysql.creation import \ from django.db.backends.mysql.creation import (
DatabaseCreation as MySQLDatabaseCreation DatabaseCreation as MySQLDatabaseCreation,
from django.db.backends.oracle.creation import \ )
DatabaseCreation as OracleDatabaseCreation from django.db.backends.oracle.creation import (
DatabaseCreation as OracleDatabaseCreation,
)
from django.db.utils import DatabaseError from django.db.utils import DatabaseError
from django.test import SimpleTestCase, TestCase from django.test import SimpleTestCase, TestCase

View File

@ -1,6 +1,5 @@
from django.db import models from django.db import models
# 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

@ -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

@ -9,8 +9,9 @@ from unittest import mock
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, override_settings from django.test import SimpleTestCase, override_settings
from django.test.utils import captured_stderr, captured_stdout from django.test.utils import captured_stderr, captured_stdout

View File

@ -11,8 +11,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, override_settings from django.test import SimpleTestCase, override_settings
from django.test.utils import captured_stderr, captured_stdout from django.test.utils import captured_stderr, captured_stdout

View File

@ -13,7 +13,6 @@ Both styles are demonstrated here.
""" """
from django.db import models from django.db import models
# #
# 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

@ -9,8 +9,6 @@ from django.db.models.query import ModelIterable, QuerySet
from django.utils.functional import cached_property from django.utils.functional import cached_property
# Basic tests
class Author(models.Model): class Author(models.Model):
name = models.CharField(max_length=50, unique=True) name = models.CharField(max_length=50, unique=True)
first_book = models.ForeignKey('Book', models.CASCADE, related_name='first_time_authors') first_book = models.ForeignKey('Book', models.CASCADE, related_name='first_time_authors')

View File

@ -6,7 +6,6 @@ providing a modified interface to the data from the base class.
""" """
from django.db import models from django.db import models
# 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

@ -13,7 +13,6 @@ from django.contrib.contenttypes.fields import (
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.db import models from django.db import models
# Who remembers high school biology? # Who remembers high school biology?

View File

@ -29,7 +29,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

@ -11,12 +11,14 @@ from http import cookies
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

@ -7,8 +7,9 @@ from io import StringIO
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

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