autopep8, except line length

fix_request_path_info
Diederik van der Boor 2016-12-19 11:10:03 +01:00
parent 695d352edb
commit 1d13b4f3c5
6 changed files with 7 additions and 9 deletions

View File

@ -167,7 +167,6 @@ class PolymorphicChildModelAdmin(admin.ModelAdmin):
context.update(extra_context)
return super(PolymorphicChildModelAdmin, self).history_view(request, object_id, extra_context=context)
# ---- Extra: improving the form/fieldset default display ----
def get_fieldsets(self, request, obj=None):

View File

@ -11,6 +11,7 @@ class GenericPolymorphicFormSetChild(PolymorphicFormSetChild):
"""
Formset child for generic inlines
"""
def __init__(self, *args, **kwargs):
self.ct_field = kwargs.pop('ct_field', 'content_type')
self.fk_field = kwargs.pop('fk_field', 'object_id')

View File

@ -2,6 +2,7 @@
Internal utils
"""
def add_media(dest, media):
"""
Optimized version of django.forms.Media.__add__() that doesn't create new objects.

View File

@ -472,4 +472,3 @@ class PolymorphicQuerySet(QuerySet):
return olist
clist = PolymorphicQuerySet._p_list_class(olist)
return clist

View File

@ -110,7 +110,6 @@ def translate_polymorphic_filter_definitions_in_args(queryset_model, args, using
return [translate_polymorphic_Q_object(queryset_model, q, using=using) for q in q_objects]
def _translate_polymorphic_filter_definition(queryset_model, field_path, field_val, using=DEFAULT_DB_ALIAS):
"""
Translate a keyword argument (field_path=field_val), as used for
@ -271,4 +270,3 @@ def _create_model_filter_Q(modellist, not_instance_of=False, using=DEFAULT_DB_AL
if not_instance_of:
q_ored = ~q_ored
return q_ored

View File

@ -432,6 +432,7 @@ class PolymorphicTests(TestCase):
"""
The test suite
"""
def test_annotate_aggregate_order(self):
# create a blog of type BlogA
# create two blog entries in BlogA
@ -630,7 +631,6 @@ class PolymorphicTests(TestCase):
self.assertEqual(repr(objects_only_field4[3]),
'<Model2D: id 4, field1 (CharField), field2 (CharField), field3 (CharField), field4 (CharField), deferred[field4]>')
def test_manual_get_real_instance(self):
self.create_model2abcd()