Skip to content

Commit

Permalink
Quick lint
Browse files Browse the repository at this point in the history
  • Loading branch information
felton committed Jan 9, 2025
1 parent 9e85722 commit 3be86d5
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions nested_admin/nested.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def _djn_js_deps(self):


class NestedInlineAdminFormsetMixin(NestedAdminMixin):

classes = None

def __init__(self, inline, *args, **kwargs):
Expand Down Expand Up @@ -240,7 +239,6 @@ class NestedInlineAdminFormset(


class NestedModelAdminMixin(NestedAdminMixin):

inline_admin_formset_helper_cls = NestedInlineAdminFormset

@property
Expand Down Expand Up @@ -366,7 +364,7 @@ def _create_formsets(self, request, obj, change):
form_obj = None
is_empty_form = True
InlineFormSet = inline.get_formset(request, form_obj)

# Check if we're dealing with a polymorphic instance, and if
# so, skip inlines for other child models
if hasattr(form_obj, "get_real_instance"):
Expand Down Expand Up @@ -504,7 +502,6 @@ def render_change_form(self, request, context, obj=None, *args, **kwargs):


class NestedInlineModelAdminMixin:

is_sortable = True
sortable_field_name = None

Expand Down Expand Up @@ -562,7 +559,6 @@ class NestedInlineModelAdmin(NestedInlineModelAdminMixin, InlineModelAdmin):


class NestedStackedInlineMixin(NestedInlineModelAdminMixin):

if "grappelli" in settings.INSTALLED_APPS:
template = "nesting/admin/inlines/grappelli_stacked.html"
else:
Expand All @@ -574,7 +570,6 @@ class NestedStackedInline(NestedStackedInlineMixin, InlineModelAdmin):


class NestedTabularInlineMixin(NestedInlineModelAdminMixin):

if "grappelli" in settings.INSTALLED_APPS:
template = "nesting/admin/inlines/grappelli_tabular.html"
fieldset_template = "nesting/admin/includes/grappelli_inline_tabular.html"
Expand All @@ -587,7 +582,6 @@ class NestedTabularInline(NestedTabularInlineMixin, InlineModelAdmin):


class NestedGenericInlineModelAdminMixin(NestedInlineModelAdminMixin):

formset = NestedBaseGenericInlineFormSet


Expand All @@ -598,7 +592,6 @@ class NestedGenericInlineModelAdmin(


class NestedGenericStackedInlineMixin(NestedGenericInlineModelAdminMixin):

if "grappelli" in settings.INSTALLED_APPS:
template = "nesting/admin/inlines/grappelli_stacked.html"
else:
Expand All @@ -612,7 +605,6 @@ class NestedGenericStackedInline(


class NestedGenericTabularInlineMixin(NestedGenericInlineModelAdminMixin):

if "grappelli" in settings.INSTALLED_APPS:
template = "nesting/admin/inlines/grappelli_tabular.html"
fieldset_template = "nesting/admin/includes/grappelli_inline_tabular.html"
Expand Down

0 comments on commit 3be86d5

Please sign in to comment.