[1.11.x] Sorted imports per isort 4.2.9.
Backport of cde31daf88
from master
This commit is contained in:
parent
2134090e79
commit
3cd9a4b1ea
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@ https://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.1.html
|
|||
import re
|
||||
import sys
|
||||
|
||||
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
|
||||
|
|
|
@ -4,7 +4,6 @@ from django.contrib.gis.geoip.libgeoip import free, lgeoip
|
|||
|
||||
|
||||
# #### GeoIP C Structure definitions ####
|
||||
|
||||
class GeoIPRecord(Structure):
|
||||
_fields_ = [('country_code', c_char_p),
|
||||
('country_code3', c_char_p),
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
from django.utils import six
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
|||
from django.db import models
|
||||
from django.utils import six
|
||||
|
||||
|
||||
# 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.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from django.core.checks.compatibility.django_1_10 import \
|
||||
check_duplicate_middleware_settings
|
||||
from django.core.checks.compatibility.django_1_10 import (
|
||||
check_duplicate_middleware_settings,
|
||||
)
|
||||
from django.test import SimpleTestCase
|
||||
from django.test.utils import override_settings
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from django.core.checks.compatibility.django_1_8_0 import \
|
||||
check_duplicate_template_settings
|
||||
from django.core.checks.compatibility.django_1_8_0 import (
|
||||
check_duplicate_template_settings,
|
||||
)
|
||||
from django.test import SimpleTestCase
|
||||
from django.test.utils import override_settings
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -10,8 +10,9 @@ from subprocess import Popen
|
|||
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, mock, override_settings
|
||||
from django.test.utils import captured_stderr, captured_stdout
|
||||
|
|
|
@ -14,8 +14,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, mock, override_settings
|
||||
from django.test.utils import captured_stderr, captured_stdout
|
||||
|
|
|
@ -16,7 +16,6 @@ from __future__ import unicode_literals
|
|||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
#
|
||||
# Abstract base classes
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -10,8 +10,6 @@ from django.utils.encoding import python_2_unicode_compatible
|
|||
from django.utils.functional import cached_property
|
||||
|
||||
|
||||
# Basic tests
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Author(models.Model):
|
||||
name = models.CharField(max_length=50, unique=True)
|
||||
|
|
|
@ -7,7 +7,6 @@ providing a modified interface to the data from the base class.
|
|||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
# A couple of managers for testing managing overriding in proxy model cases.
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ from django.contrib.contenttypes.models import ContentType
|
|||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
# Who remembers high school biology?
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,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
|
||||
|
|
|
@ -10,12 +10,14 @@ from datetime import timedelta
|
|||
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
|
||||
|
|
|
@ -8,8 +8,9 @@ import unittest
|
|||
|
||||
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
|
||||
|
|
|
@ -6,7 +6,6 @@ is generated for the table on various manage.py operations.
|
|||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
# All of these models are created in the database by Django.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue