[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] 2021-12-11 13:29:35 +00:00
parent 4e8002ecf5
commit 1d7654e5e1
5 changed files with 8 additions and 11 deletions

View file

@ -2,5 +2,4 @@
__version__ = "1.8.0"
default_app_config = "categories.apps.CategoriesConfig"

View file

@ -232,11 +232,14 @@ class TreeEditor(admin.ModelAdmin):
name = force_text(opts.verbose_name)
else:
name = force_text(opts.verbose_name_plural)
msg = ungettext(
"%(count)s %(name)s was changed successfully.",
"%(count)s %(name)s were changed successfully.",
changecount,
) % {"count": changecount, "name": name, "obj": force_text(obj)}
msg = (
ungettext(
"%(count)s %(name)s was changed successfully.",
"%(count)s %(name)s were changed successfully.",
changecount,
)
% {"count": changecount, "name": name, "obj": force_text(obj)}
)
self.message_user(request, msg)
return HttpResponseRedirect(request.get_full_path())

View file

@ -1,5 +1,3 @@
from django.apps import apps
from django.db import connection, transaction
from django.db.utils import ProgrammingError

View file

@ -1,5 +1,3 @@
import django.core.files.storage
import mptt.fields
from django.db import migrations, models

View file

@ -1,4 +1,3 @@
from django.contrib.auth.models import User
from django.test import Client, TestCase
from django.urls import reverse