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 \
DatabaseWrapper as MySQLDatabaseWrapper
from django.db.backends.mysql.base import (
DatabaseWrapper as MySQLDatabaseWrapper,
)
from .features import DatabaseFeatures
from .introspection import MySQLIntrospection

View File

@ -1,6 +1,7 @@
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.db.backends.mysql.features import \
DatabaseFeatures as MySQLDatabaseFeatures
from django.db.backends.mysql.features import (
DatabaseFeatures as 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.operations import \
BaseSpatialOperations
from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations,
)
from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.db.models import GeometryField, aggregates
from django.db.backends.mysql.operations import DatabaseOperations

View File

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

View File

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

View File

@ -9,8 +9,9 @@
"""
import re
from django.contrib.gis.db.backends.base.operations import \
BaseSpatialOperations
from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations,
)
from django.contrib.gis.db.backends.oracle.adapter import OracleSpatialAdapter
from django.contrib.gis.db.backends.utils import SpatialOperator
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.postgresql.base import \
DatabaseWrapper as Psycopg2DatabaseWrapper
from django.db.backends.postgresql.base import (
DatabaseWrapper as Psycopg2DatabaseWrapper,
)
from .features import DatabaseFeatures
from .introspection import PostGISIntrospection

View File

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

View File

@ -1,8 +1,9 @@
import re
from django.conf import settings
from django.contrib.gis.db.backends.base.operations import \
BaseSpatialOperations
from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations,
)
from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.gdal import GDALRaster
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.db.backends.sqlite3.features import \
DatabaseFeatures as SQLiteDatabaseFeatures
from django.db.backends.sqlite3.features import (
DatabaseFeatures as SQLiteDatabaseFeatures,
)
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
from django.contrib.gis.db.backends.base.operations import \
BaseSpatialOperations
from django.contrib.gis.db.backends.base.operations import (
BaseSpatialOperations,
)
from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter
from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.db.models import aggregates

View File

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

View File

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

View File

@ -5,8 +5,9 @@ import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.mail.backends.console import \
EmailBackend as ConsoleEmailBackend
from django.core.mail.backends.console import (
EmailBackend as 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 (
TEST_DATABASE_PREFIX, BaseDatabaseCreation,
)
from django.db.backends.mysql.creation import \
DatabaseCreation as MySQLDatabaseCreation
from django.db.backends.oracle.creation import \
DatabaseCreation as OracleDatabaseCreation
from django.db.backends.mysql.creation import (
DatabaseCreation as MySQLDatabaseCreation,
)
from django.db.backends.oracle.creation import (
DatabaseCreation as OracleDatabaseCreation,
)
from django.db.utils import DatabaseError
from django.test import SimpleTestCase, TestCase

View File

@ -1,6 +1,5 @@
from django.db import models
# 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
# 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,
)
# Note that these tests are testing internal implementation details.
# ForeignObject is not part of public API.

View File

@ -9,8 +9,9 @@ from unittest import mock
from django.core.management import (
CommandError, call_command, execute_from_command_line,
)
from django.core.management.commands.makemessages import \
Command as MakeMessagesCommand
from django.core.management.commands.makemessages import (
Command as MakeMessagesCommand,
)
from django.core.management.utils import find_command
from django.test import SimpleTestCase, override_settings
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.management import execute_from_command_line
from django.core.management.base import CommandError
from django.core.management.commands.makemessages import \
Command as MakeMessagesCommand
from django.core.management.commands.makemessages import (
Command as MakeMessagesCommand,
)
from django.core.management.utils import find_command
from django.test import SimpleTestCase, override_settings
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
#
# Abstract base classes
#

View File

@ -1,6 +1,5 @@
from django.db import models
# 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
# 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
# Basic tests
class Author(models.Model):
name = models.CharField(max_length=50, unique=True)
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
# 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.db import models
# Who remembers high school biology?

View File

@ -29,7 +29,6 @@ from .models import (
)
from .tests import register_tests
# A set of functions that can be used to recreate
# test data objects of various kinds.
# 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.contrib.sessions.backends.base import UpdateError
from django.contrib.sessions.backends.cache import SessionStore as CacheSession
from django.contrib.sessions.backends.cached_db import \
SessionStore as CacheDBSession
from django.contrib.sessions.backends.cached_db import (
SessionStore as CacheDBSession,
)
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.signed_cookies import \
SessionStore as CookieSession
from django.contrib.sessions.backends.signed_cookies import (
SessionStore as CookieSession,
)
from django.contrib.sessions.exceptions import InvalidSessionKey
from django.contrib.sessions.middleware import SessionMiddleware
from django.contrib.sessions.models import Session

View File

@ -7,8 +7,9 @@ from io import StringIO
from django.conf import settings
from django.contrib.staticfiles import finders, storage
from django.contrib.staticfiles.management.commands.collectstatic import \
Command as CollectstaticCommand
from django.contrib.staticfiles.management.commands.collectstatic import (
Command as CollectstaticCommand,
)
from django.core.cache.backends.base import BaseCache
from django.core.management import call_command
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
# All of these models are created in the database by Django.