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

Update to black 21.4.0 #112

Merged
merged 1 commit into from
Jan 26, 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
1 change: 1 addition & 0 deletions analytics/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Analytics Application configuration"""

from django.apps import AppConfig


Expand Down
1 change: 1 addition & 0 deletions analytics/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Analytics models"""

from django.db.models import Model, CharField, IntegerField, DateField, ForeignKey, CASCADE
from django.utils.translation import gettext_lazy as _

Expand Down
1 change: 1 addition & 0 deletions analytics/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Analytics URLs configuration"""

from django.urls import path

from analytics.views import AnalyticsShowView, AnalyticsRestView
Expand Down
1 change: 1 addition & 0 deletions analytics/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Analytics views"""

from datetime import datetime, timedelta

from django.contrib.auth.decorators import login_required
Expand Down
1 change: 1 addition & 0 deletions backend/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Backend Admin pages"""

from django.contrib import admin

from backend.forms import AdminSongForm
Expand Down
1 change: 1 addition & 0 deletions backend/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Backend app"""

from django.apps import AppConfig


Expand Down
1 change: 1 addition & 0 deletions backend/forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Forms for backend app"""

from django.forms import ModelForm, ModelMultipleChoiceField, CheckboxSelectMultiple

from backend.models import Song
Expand Down
1 change: 1 addition & 0 deletions backend/management/commands/clear_prerender.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Clear prerender command"""

from django.core.management import BaseCommand

from backend.models import Song
Expand Down
1 change: 1 addition & 0 deletions backend/management/commands/import.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Management command for importing Songs"""

import json
import logging
from argparse import ArgumentParser
Expand Down
1 change: 1 addition & 0 deletions backend/management/commands/prerender.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Prerender command"""

from django.core.management import BaseCommand

from backend.models import Song
Expand Down
1 change: 1 addition & 0 deletions backend/menus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Menus for backend app"""

from django.urls import reverse
from django.utils.translation import gettext_noop as _
from menu import MenuItem, Menu
Expand Down
1 change: 1 addition & 0 deletions backend/middleware/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Middleware"""

from .cache import DisableClientSideCachingMiddleware
from .settings import SiteNameMiddleware
1 change: 1 addition & 0 deletions backend/middleware/cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Middlewares for cache manipulation"""

from django.utils.cache import add_never_cache_headers


Expand Down
1 change: 1 addition & 0 deletions backend/middleware/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Middleware containing forwarding variables from settings to templates"""

from django.conf import settings


Expand Down
1 change: 1 addition & 0 deletions backend/mixins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""General mixins"""

from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin

from backend.auth import is_localadmin, is_superadmin
Expand Down
1 change: 1 addition & 0 deletions backend/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models for backend app"""

from django.conf import settings
from django.db.models import (
Model,
Expand Down
1 change: 1 addition & 0 deletions backend/templatetags/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tags for drawing the menu"""

from django import template
from django.template.defaultfilters import stringfilter
from django.templatetags.static import static
Expand Down
1 change: 1 addition & 0 deletions backend/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Backend app URL Configuration"""

from django.urls import path

from backend.views import (
Expand Down
1 change: 1 addition & 0 deletions backend/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions for backend app"""

import subprocess
from email.utils import parsedate_to_datetime
from functools import cache
Expand Down
1 change: 1 addition & 0 deletions backend/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Views for backend app"""

import json
from typing import Dict

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

from django.contrib import admin
from django.http import HttpResponseRedirect
from django.urls import reverse, reverse_lazy
Expand Down
1 change: 1 addition & 0 deletions category/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Category Application"""

from django.apps import AppConfig


Expand Down
1 change: 1 addition & 0 deletions category/forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Forms for category app"""

from django.forms import ModelForm, IntegerField, Form, HiddenInput, ModelChoiceField, CharField
from django.utils.translation import gettext_lazy as _

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

from django.db.models import CharField, SlugField, BooleanField, ForeignKey, CASCADE
from django.utils.translation import gettext_lazy as _

Expand Down
1 change: 1 addition & 0 deletions category/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Backend app URL Configuration"""

from django.urls import path

from category.views import (
Expand Down
1 change: 1 addition & 0 deletions category/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Views for categories"""

from django.conf import settings
from django.contrib import messages
from django.contrib.messages.views import SuccessMessageMixin
Expand Down
1 change: 1 addition & 0 deletions chords/markdown.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing Rendering function for converting Markdown to HTML"""

import mistune

from chords.plugins.chords import chords
Expand Down
1 change: 1 addition & 0 deletions chords/plugins/chords.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Markdown extension for chords"""

from mistune import InlineState

CHORD_RE = r"\{(?!\s)(?P<chords>.+?)(?!\s)\}"
Expand Down
1 change: 1 addition & 0 deletions chords/plugins/paragraph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Markdown extension for paragraphs"""

import re
import string

Expand Down
1 change: 1 addition & 0 deletions chords/plugins/spaces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Markdown extension for spaces"""

from mistune import InlineState

SPACES_RE = r"\/(?P<spacers>\d+)\/"
Expand Down
1 change: 1 addition & 0 deletions chords/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""

import debug_toolbar
from django.conf import settings
from django.conf.urls.static import static
Expand Down
1 change: 1 addition & 0 deletions frontend/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Frontend App"""

from django.apps import AppConfig


Expand Down
1 change: 1 addition & 0 deletions pdf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Initialize PDF module, specifically create media directory if it doesn't exist"""

from pathlib import Path

from django.conf import settings
Expand Down
1 change: 1 addition & 0 deletions pdf/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""PDF Admin classes"""

from urllib.parse import urlencode

from django.contrib import admin
Expand Down
1 change: 1 addition & 0 deletions pdf/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""App configuration"""

from django.apps import AppConfig


Expand Down
1 change: 1 addition & 0 deletions pdf/cachemenuitem.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for menu items stored in cache"""

from django.core.cache import cache
from menu import MenuItem

Expand Down
1 change: 1 addition & 0 deletions pdf/forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Forms for PDF application"""

from django.core.exceptions import ValidationError
from django.forms import ModelForm, CharField, BaseFormSet, HiddenInput, Form, IntegerField
from django.utils.translation import gettext_lazy as _
Expand Down
1 change: 1 addition & 0 deletions pdf/generate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing all things related to generating PDF"""

import locale
import logging
import mimetypes
Expand Down
1 change: 1 addition & 0 deletions pdf/locales.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utils module for locale manipulation"""

import locale
from contextlib import contextmanager

Expand Down
1 change: 1 addition & 0 deletions pdf/management/commands/generate_pdf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Management command for generating PDF files from requests"""

import logging
from argparse import ArgumentParser
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions pdf/menus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Menus for PDF app"""

from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from menu import Menu, MenuItem
Expand Down
1 change: 1 addition & 0 deletions pdf/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Common classes for PDF"""

from django.conf import settings
from django.db.models import Model, BooleanField, CharField, ImageField, FloatField
from django.utils.translation import gettext_lazy as _
Expand Down
1 change: 1 addition & 0 deletions pdf/models/request.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models for PDF module"""

from datetime import datetime
from typing import List

Expand Down
1 change: 1 addition & 0 deletions pdf/storage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Storages for the PDF application"""

from pathlib import Path

from django.core.files.storage import FileSystemStorage
Expand Down
1 change: 1 addition & 0 deletions pdf/templatetags/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Template tags for transforming PDFRequest column types"""

import os

from django import template
Expand Down
1 change: 1 addition & 0 deletions pdf/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Url configuration for PDF app"""

from django.urls import path

from pdf.views import (
Expand Down
1 change: 1 addition & 0 deletions pdf/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions"""

import logging
from datetime import timedelta

Expand Down
1 change: 1 addition & 0 deletions pdf/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Views for PDF app"""

from django.conf import settings
from django.contrib import messages
from django.core.cache import cache
Expand Down
1 change: 1 addition & 0 deletions tenants/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Admin models for Tenants"""

from django.conf import settings
from django.contrib import admin
from django.urls import reverse_lazy, reverse
Expand Down
1 change: 1 addition & 0 deletions tenants/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tenant App configuration"""

from django.apps import AppConfig


Expand Down
1 change: 1 addition & 0 deletions tenants/forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tenant forms"""

from django.forms import ModelForm, CharField

from tenants.models import Tenant
Expand Down
1 change: 1 addition & 0 deletions tenants/menus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Generates Tenant-specific menus"""

import os

from django.conf import settings
Expand Down
1 change: 1 addition & 0 deletions tenants/middleware.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Middleware for Tenants"""

from urllib.parse import urlparse
from django.conf import settings
from django.http import Http404
Expand Down
1 change: 1 addition & 0 deletions tenants/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tenant models"""

from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from django.db.models import Model, CharField, ManyToManyField, BooleanField, ImageField
Expand Down
1 change: 1 addition & 0 deletions tenants/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""URLs for Tenant"""

from django.urls import path

from tenants.views import TenantUpdateForm
Expand Down
1 change: 1 addition & 0 deletions tenants/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility methods"""

from tenants.models import Tenant


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

from django.contrib.messages.views import SuccessMessageMixin
from django.urls import reverse_lazy
from django.views.generic import UpdateView
Expand Down
Loading