autoflake: remove unused imports and statements
parent
1d13b4f3c5
commit
3170ea95c2
|
|
@ -8,13 +8,11 @@ from django.core.urlresolvers import resolve
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from .helpers import PolymorphicInlineSupportMixin
|
|
||||||
from ..admin import PolymorphicParentModelAdmin
|
from ..admin import PolymorphicParentModelAdmin
|
||||||
|
|
||||||
|
|
||||||
class ParentAdminNotRegistered(RuntimeError):
|
class ParentAdminNotRegistered(RuntimeError):
|
||||||
"The admin site for the model is not registered."
|
"The admin site for the model is not registered."
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class PolymorphicChildModelAdmin(admin.ModelAdmin):
|
class PolymorphicChildModelAdmin(admin.ModelAdmin):
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,10 @@ if sys.version_info[0] >= 3:
|
||||||
|
|
||||||
class RegistrationClosed(RuntimeError):
|
class RegistrationClosed(RuntimeError):
|
||||||
"The admin model can't be registered anymore at this point."
|
"The admin model can't be registered anymore at this point."
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ChildAdminNotRegistered(RuntimeError):
|
class ChildAdminNotRegistered(RuntimeError):
|
||||||
"The admin site for the model is not registered."
|
"The admin site for the model is not registered."
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class PolymorphicParentModelAdmin(admin.ModelAdmin):
|
class PolymorphicParentModelAdmin(admin.ModelAdmin):
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
# For compatibility with pre 0.8 versions
|
# For compatibility with pre 0.8 versions
|
||||||
from .managers import PolymorphicQuerySet, PolymorphicManager
|
from .managers import PolymorphicQuerySet, PolymorphicManager # noqa
|
||||||
|
|
|
||||||
|
|
@ -1071,7 +1071,6 @@ class PolymorphicTests(TestCase):
|
||||||
|
|
||||||
def test_content_types_for_proxy_models(self):
|
def test_content_types_for_proxy_models(self):
|
||||||
"""Checks if ContentType is capable of returning proxy models."""
|
"""Checks if ContentType is capable of returning proxy models."""
|
||||||
from django.db.models import Model
|
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
|
|
||||||
ct = ContentType.objects.get_for_model(ProxyChild, for_concrete_model=False)
|
ct = ContentType.objects.get_for_model(ProxyChild, for_concrete_model=False)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue