[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-03-12 20:23:19 +00:00
parent bba4b41ec2
commit 9b60339529
13 changed files with 13 additions and 0 deletions

View File

@ -13,6 +13,7 @@ middleware here, or combine a Django application with an application of another
framework.
"""
import os
# This application object is used by any WSGI server configured to use this

View File

@ -2,6 +2,7 @@
This module is a scratchpad for general development, testing & debugging
Well, even more so than pcmd.py. You best ignore p2cmd.py.
"""
import sys
import time
from pprint import pprint

View File

@ -4,6 +4,7 @@ ModelAdmin code to display polymorphic models.
The admin consists of a parent admin (which shows in the admin with a list),
and a child admin (which is used internally to show the edit/delete dialog).
"""
# Admins for the regular models
from .parentadmin import PolymorphicParentModelAdmin # noqa
from .childadmin import PolymorphicChildModelAdmin

View File

@ -1,6 +1,7 @@
"""
The child admin displays the change/delete view of the subclass model.
"""
import inspect
from django.contrib import admin

View File

@ -3,6 +3,7 @@ Rendering utils for admin forms;
This makes sure that admin fieldsets/layout settings are exported to the template.
"""
import json
from django.contrib.admin.helpers import AdminField, InlineAdminForm, InlineAdminFormSet

View File

@ -3,6 +3,7 @@ Django Admin support for polymorphic inlines.
Each row in the inline can correspond with a different subclass.
"""
from functools import partial
from django.conf import settings

View File

@ -1,6 +1,7 @@
"""
The parent admin displays the list view of the base model.
"""
from django.contrib import admin
from django.contrib.admin.helpers import AdminErrorList, AdminForm
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters

View File

@ -1,6 +1,7 @@
"""
PolymorphicModel Meta Class
"""
import inspect
import os
import sys

View File

@ -4,6 +4,7 @@ The ``extra_views.advanced`` provides a method to combine that with a create/upd
This package provides classes that support both options for polymorphic formsets.
"""
import extra_views
from django.core.exceptions import ImproperlyConfigured

View File

@ -8,6 +8,7 @@ For every child type, there is an :class:`PolymorphicFormSetChild` instance
that describes how to display and construct the child.
It's parameters are very similar to the parent's factory method.
"""
from .generic import ( # Can import generic here, as polymorphic already depends on the 'contenttypes' app.
BaseGenericPolymorphicInlineFormSet,
GenericPolymorphicFormSetChild,

View File

@ -1,6 +1,7 @@
"""
Seamless Polymorphic Inheritance for Django Models
"""
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models.fields.related import ForwardManyToOneDescriptor, ReverseOneToOneDescriptor

View File

@ -1,6 +1,7 @@
"""
QuerySet for PolymorphicModel
"""
import copy
from collections import defaultdict

View File

@ -1,6 +1,7 @@
"""
PolymorphicQuerySet support functions
"""
import copy
from collections import deque