diff options
| author | Tim Graham <timograham@gmail.com> | 2015-02-09 13:19:34 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-09 14:24:06 -0500 |
| commit | a8b70d251d238b4e6cfc7bb4296da15494f8dff3 (patch) | |
| tree | 94ef5bc53e59131906aecfcf792eeac86242aa62 /django/contrib/contenttypes | |
| parent | eb406aa686ff1809903366ef6896037af2f1f69b (diff) | |
[1.8.x] Sorted imports with isort; refs #23860.
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
Diffstat (limited to 'django/contrib/contenttypes')
| -rw-r--r-- | django/contrib/contenttypes/admin.py | 2 | ||||
| -rw-r--r-- | django/contrib/contenttypes/checks.py | 2 | ||||
| -rw-r--r-- | django/contrib/contenttypes/fields.py | 9 | ||||
| -rw-r--r-- | django/contrib/contenttypes/forms.py | 2 | ||||
| -rw-r--r-- | django/contrib/contenttypes/generic.py | 12 | ||||
| -rw-r--r-- | django/contrib/contenttypes/migrations/0001_initial.py | 2 | ||||
| -rw-r--r-- | django/contrib/contenttypes/migrations/0002_remove_content_type_name.py | 2 | ||||
| -rw-r--r-- | django/contrib/contenttypes/models.py | 2 | ||||
| -rw-r--r-- | django/contrib/contenttypes/tests/tests.py | 5 |
9 files changed, 20 insertions, 18 deletions
diff --git a/django/contrib/contenttypes/admin.py b/django/contrib/contenttypes/admin.py index 3db9d2d612..85bf3227e3 100644 --- a/django/contrib/contenttypes/admin.py +++ b/django/contrib/contenttypes/admin.py @@ -6,7 +6,7 @@ from django.contrib.admin.checks import InlineModelAdminChecks from django.contrib.admin.options import InlineModelAdmin, flatten_fieldsets from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.forms import ( - BaseGenericInlineFormSet, generic_inlineformset_factory + BaseGenericInlineFormSet, generic_inlineformset_factory, ) from django.core import checks from django.core.exceptions import FieldDoesNotExist diff --git a/django/contrib/contenttypes/checks.py b/django/contrib/contenttypes/checks.py index 890859505a..1b3df21353 100644 --- a/django/contrib/contenttypes/checks.py +++ b/django/contrib/contenttypes/checks.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.utils import six from django.apps import apps +from django.utils import six def check_generic_foreign_keys(**kwargs): diff --git a/django/contrib/contenttypes/fields.py b/django/contrib/contenttypes/fields.py index fba8e0c222..7bd9b79415 100644 --- a/django/contrib/contenttypes/fields.py +++ b/django/contrib/contenttypes/fields.py @@ -2,16 +2,15 @@ from __future__ import unicode_literals from collections import defaultdict +from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist -from django.db import connection -from django.db import models, router, transaction, DEFAULT_DB_ALIAS -from django.db.models import signals, DO_NOTHING +from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction +from django.db.models import DO_NOTHING, signals from django.db.models.base import ModelBase from django.db.models.fields.related import ForeignObject, ForeignObjectRel from django.db.models.query_utils import PathInfo -from django.contrib.contenttypes.models import ContentType -from django.utils.encoding import smart_text, python_2_unicode_compatible +from django.utils.encoding import python_2_unicode_compatible, smart_text @python_2_unicode_compatible diff --git a/django/contrib/contenttypes/forms.py b/django/contrib/contenttypes/forms.py index 693628d3de..e590c3db05 100644 --- a/django/contrib/contenttypes/forms.py +++ b/django/contrib/contenttypes/forms.py @@ -1,9 +1,9 @@ from __future__ import unicode_literals +from django.contrib.contenttypes.models import ContentType from django.db import models from django.forms import ModelForm, modelformset_factory from django.forms.models import BaseModelFormSet -from django.contrib.contenttypes.models import ContentType class BaseGenericInlineFormSet(BaseModelFormSet): diff --git a/django/contrib/contenttypes/generic.py b/django/contrib/contenttypes/generic.py index 19622d33d8..92df783d02 100644 --- a/django/contrib/contenttypes/generic.py +++ b/django/contrib/contenttypes/generic.py @@ -10,12 +10,12 @@ warnings.warn( 'submodules of django.contrib.contenttypes.'), RemovedInDjango19Warning, stacklevel=2 ) -from django.contrib.contenttypes.admin import ( # NOQA - GenericInlineModelAdmin, GenericStackedInline, GenericTabularInline +from django.contrib.contenttypes.admin import ( # NOQA isort:skip + GenericInlineModelAdmin, GenericStackedInline, GenericTabularInline, ) -from django.contrib.contenttypes.fields import ( # NOQA - GenericForeignKey, GenericRelation +from django.contrib.contenttypes.fields import ( # NOQA isort:skip + GenericForeignKey, GenericRelation, ) -from django.contrib.contenttypes.forms import ( # NOQA - BaseGenericInlineFormSet, generic_inlineformset_factory +from django.contrib.contenttypes.forms import ( # NOQA isort:skip + BaseGenericInlineFormSet, generic_inlineformset_factory, ) diff --git a/django/contrib/contenttypes/migrations/0001_initial.py b/django/contrib/contenttypes/migrations/0001_initial.py index 09519f1d75..68190b2a2b 100644 --- a/django/contrib/contenttypes/migrations/0001_initial.py +++ b/django/contrib/contenttypes/migrations/0001_initial.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import models, migrations import django.contrib.contenttypes.models +from django.db import migrations, models class Migration(migrations.Migration): diff --git a/django/contrib/contenttypes/migrations/0002_remove_content_type_name.py b/django/contrib/contenttypes/migrations/0002_remove_content_type_name.py index 1b91437dbc..b2e18846b9 100644 --- a/django/contrib/contenttypes/migrations/0002_remove_content_type_name.py +++ b/django/contrib/contenttypes/migrations/0002_remove_content_type_name.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import models, migrations +from django.db import migrations, models def add_legacy_name(apps, schema_editor): diff --git a/django/contrib/contenttypes/models.py b/django/contrib/contenttypes/models.py index 684380c832..5205ec80f9 100644 --- a/django/contrib/contenttypes/models.py +++ b/django/contrib/contenttypes/models.py @@ -5,9 +5,9 @@ import warnings from django.apps import apps from django.db import models from django.db.utils import OperationalError, ProgrammingError -from django.utils.translation import ugettext_lazy as _ from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import force_text, python_2_unicode_compatible +from django.utils.translation import ugettext_lazy as _ class ContentTypeManager(models.Manager): diff --git a/django/contrib/contenttypes/tests/tests.py b/django/contrib/contenttypes/tests/tests.py index 5ce9b395f1..8e4dae3b37 100644 --- a/django/contrib/contenttypes/tests/tests.py +++ b/django/contrib/contenttypes/tests/tests.py @@ -9,7 +9,10 @@ from django.http import Http404, HttpRequest from django.test import TestCase, override_settings from django.utils import six -from .models import ConcreteModel, ProxyModel, FooWithoutUrl, FooWithUrl, FooWithBrokenAbsoluteUrl +from .models import ( + ConcreteModel, FooWithBrokenAbsoluteUrl, FooWithoutUrl, FooWithUrl, + ProxyModel, +) class ContentTypesTests(TestCase): |
