Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 19, 2024
1 parent 523691b commit c8fa505
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 6 deletions.
1 change: 1 addition & 0 deletions categories/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Django categories."""

__version__ = "1.9.2"


Expand Down
1 change: 1 addition & 0 deletions categories/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Admin interface classes."""

from django import forms
from django.contrib import admin
from django.utils.translation import gettext_lazy as _
Expand Down
1 change: 1 addition & 0 deletions categories/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Django application setup."""

from django.apps import AppConfig


Expand Down
1 change: 1 addition & 0 deletions categories/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
It provides customizable metadata and its own name space.
"""

from django import forms
from django.contrib import admin
from django.db import models
Expand Down
1 change: 1 addition & 0 deletions categories/editor/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Settings management for the editor."""

from django.conf import settings

STATIC_URL = getattr(settings, "STATIC_URL", settings.MEDIA_URL)
Expand Down
15 changes: 9 additions & 6 deletions categories/editor/templatetags/admin_tree_list_tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Template tags used to render the tree editor."""

from django.contrib.admin.templatetags.admin_list import _boolean_icon, result_headers
from django.contrib.admin.utils import lookup_field
from django.core.exceptions import ObjectDoesNotExist
Expand Down Expand Up @@ -89,12 +90,14 @@ def items_for_tree_result(cl, result, form):
table_tag,
row_class,
url,
format_html(
' onclick="opener.dismissRelatedLookupPopup(window, ' ''{}'); return false;"',
result_id,
)
if cl.is_popup
else "",
(
format_html(
' onclick="opener.dismissRelatedLookupPopup(window, ' ''{}'); return false;"',
result_id,
)
if cl.is_popup
else ""
),
result_repr,
table_tag,
)
Expand Down
1 change: 1 addition & 0 deletions categories/editor/tree_editor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Classes for representing tree structures in Django's admin."""

from typing import Any

import django
Expand Down
1 change: 1 addition & 0 deletions categories/editor/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Provides compatibility with Django 1.8.
"""

from django.contrib.admin.utils import display_for_field as _display_for_field


Expand Down
1 change: 1 addition & 0 deletions categories/fields.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Custom category fields for other models."""

from django.db.models import ForeignKey, ManyToManyField


Expand Down
1 change: 1 addition & 0 deletions categories/genericcollection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Special helpers for generic collections."""

import json

from django.contrib import admin
Expand Down
1 change: 1 addition & 0 deletions categories/management/commands/add_category_fields.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The add_category_fields command."""

from django.core.management.base import BaseCommand


Expand Down
1 change: 1 addition & 0 deletions categories/management/commands/drop_category_field.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Alter one or more models' tables with the registered attributes."""

from django.core.management.base import BaseCommand, CommandError


Expand Down
1 change: 1 addition & 0 deletions categories/migration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Adds and removes category relations on the database."""

from django.apps import apps
from django.db import DatabaseError, connection, transaction
from django.db.utils import OperationalError, ProgrammingError
Expand Down
1 change: 1 addition & 0 deletions categories/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Category models."""

from functools import reduce

from django.contrib.contenttypes.fields import GenericForeignKey
Expand Down
1 change: 1 addition & 0 deletions categories/registration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
These functions handle the adding of fields to other models.
"""

from typing import Optional, Type, Union

from collections.abc import Iterable
Expand Down
1 change: 1 addition & 0 deletions categories/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Manages settings for the categories application."""

import collections

from django.conf import settings
Expand Down
1 change: 1 addition & 0 deletions categories/templatetags/category_tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Template tags for categories."""

from typing import Any, Type, Union

from django import template
Expand Down
1 change: 1 addition & 0 deletions categories/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""URL patterns for the categories app."""

from django.urls import path, re_path
from django.views.generic import ListView

Expand Down
1 change: 1 addition & 0 deletions categories/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""View functions for categories."""

from typing import Optional

from django.http import Http404, HttpResponse
Expand Down
1 change: 1 addition & 0 deletions example/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Django settings for sample project."""

import os
import sys

Expand Down
1 change: 1 addition & 0 deletions example/simpletext/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Admin interface for simple text."""

from django.contrib import admin

from categories.admin import CategoryBaseAdmin, CategoryBaseAdminForm
Expand Down
1 change: 1 addition & 0 deletions example/simpletext/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Example model."""

from django.db import models

from categories.base import CategoryBase
Expand Down
1 change: 1 addition & 0 deletions example/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""URL patterns for the example project."""

import os

from django.conf.urls import include
Expand Down

0 comments on commit c8fa505

Please sign in to comment.