Skip to content

Commit c8fa505

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 523691b commit c8fa505

23 files changed

+31
-6
lines changed

Diff for: categories/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Django categories."""
2+
23
__version__ = "1.9.2"
34

45

Diff for: categories/admin.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Admin interface classes."""
2+
23
from django import forms
34
from django.contrib import admin
45
from django.utils.translation import gettext_lazy as _

Diff for: categories/apps.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Django application setup."""
2+
23
from django.apps import AppConfig
34

45

Diff for: categories/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
It provides customizable metadata and its own name space.
55
"""
6+
67
from django import forms
78
from django.contrib import admin
89
from django.db import models

Diff for: categories/editor/settings.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Settings management for the editor."""
2+
23
from django.conf import settings
34

45
STATIC_URL = getattr(settings, "STATIC_URL", settings.MEDIA_URL)

Diff for: categories/editor/templatetags/admin_tree_list_tags.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Template tags used to render the tree editor."""
2+
23
from django.contrib.admin.templatetags.admin_list import _boolean_icon, result_headers
34
from django.contrib.admin.utils import lookup_field
45
from django.core.exceptions import ObjectDoesNotExist
@@ -89,12 +90,14 @@ def items_for_tree_result(cl, result, form):
8990
table_tag,
9091
row_class,
9192
url,
92-
format_html(
93-
' onclick="opener.dismissRelatedLookupPopup(window, ' ''{}'); return false;"',
94-
result_id,
95-
)
96-
if cl.is_popup
97-
else "",
93+
(
94+
format_html(
95+
' onclick="opener.dismissRelatedLookupPopup(window, ' ''{}'); return false;"',
96+
result_id,
97+
)
98+
if cl.is_popup
99+
else ""
100+
),
98101
result_repr,
99102
table_tag,
100103
)

Diff for: categories/editor/tree_editor.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Classes for representing tree structures in Django's admin."""
2+
23
from typing import Any
34

45
import django

Diff for: categories/editor/utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Provides compatibility with Django 1.8.
33
"""
4+
45
from django.contrib.admin.utils import display_for_field as _display_for_field
56

67

Diff for: categories/fields.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Custom category fields for other models."""
2+
23
from django.db.models import ForeignKey, ManyToManyField
34

45

Diff for: categories/genericcollection.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Special helpers for generic collections."""
2+
23
import json
34

45
from django.contrib import admin

Diff for: categories/management/commands/add_category_fields.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The add_category_fields command."""
2+
23
from django.core.management.base import BaseCommand
34

45

Diff for: categories/management/commands/drop_category_field.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Alter one or more models' tables with the registered attributes."""
2+
23
from django.core.management.base import BaseCommand, CommandError
34

45

Diff for: categories/migration.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Adds and removes category relations on the database."""
2+
23
from django.apps import apps
34
from django.db import DatabaseError, connection, transaction
45
from django.db.utils import OperationalError, ProgrammingError

Diff for: categories/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Category models."""
2+
23
from functools import reduce
34

45
from django.contrib.contenttypes.fields import GenericForeignKey

Diff for: categories/registration.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
These functions handle the adding of fields to other models.
33
"""
4+
45
from typing import Optional, Type, Union
56

67
from collections.abc import Iterable

Diff for: categories/settings.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Manages settings for the categories application."""
2+
23
import collections
34

45
from django.conf import settings

Diff for: categories/templatetags/category_tags.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Template tags for categories."""
2+
23
from typing import Any, Type, Union
34

45
from django import template

Diff for: categories/urls.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""URL patterns for the categories app."""
2+
23
from django.urls import path, re_path
34
from django.views.generic import ListView
45

Diff for: categories/views.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""View functions for categories."""
2+
23
from typing import Optional
34

45
from django.http import Http404, HttpResponse

Diff for: example/settings.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Django settings for sample project."""
2+
23
import os
34
import sys
45

Diff for: example/simpletext/admin.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Admin interface for simple text."""
2+
23
from django.contrib import admin
34

45
from categories.admin import CategoryBaseAdmin, CategoryBaseAdminForm

Diff for: example/simpletext/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Example model."""
2+
23
from django.db import models
34

45
from categories.base import CategoryBase

Diff for: example/urls.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""URL patterns for the example project."""
2+
23
import os
34

45
from django.conf.urls import include

0 commit comments

Comments
 (0)