Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #188

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ repos:
- id: isort
additional_dependencies: [toml]
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.4.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down Expand Up @@ -48,6 +48,6 @@ repos:
exclude: test.*|custom_.*|\d\d\d\d_.*

- repo: https://github.com/econchick/interrogate
rev: 1.5.0 # or master if you're bold
rev: 1.7.0 # or master if you're bold
hooks:
- id: interrogate
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
Loading