chore: format files using isort (pre-commit)
This commit is contained in:
parent
20ed5f0d52
commit
cff619679b
226 changed files with 483 additions and 735 deletions
|
|
@ -4,8 +4,8 @@ from rest_framework.urlpatterns import format_suffix_patterns
|
|||
|
||||
from funkwhale_api.activity import views as activity_views
|
||||
from funkwhale_api.audio import views as audio_views
|
||||
from funkwhale_api.common import views as common_views
|
||||
from funkwhale_api.common import routers as common_routers
|
||||
from funkwhale_api.common import views as common_views
|
||||
from funkwhale_api.music import views
|
||||
from funkwhale_api.playlists import views as playlists_views
|
||||
from funkwhale_api.subsonic.views import SubsonicViewSet
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import sys
|
|||
import persisting_theory
|
||||
from django.core.cache import cache
|
||||
from django.db.models import Q
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
logger = logging.getLogger("plugins")
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
from channels.auth import AuthMiddlewareStack
|
||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
from funkwhale_api.instance import consumers
|
||||
|
||||
application = ProtocolTypeRouter(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
|
||||
from drf_spectacular.contrib.django_oauth_toolkit import OpenApiAuthenticationExtension
|
||||
from drf_spectacular.plumbing import build_bearer_security_scheme_object
|
||||
import os
|
||||
|
||||
|
||||
class CustomOAuthExt(OpenApiAuthenticationExtension):
|
||||
|
|
@ -8,9 +9,8 @@ class CustomOAuthExt(OpenApiAuthenticationExtension):
|
|||
name = "oauth2"
|
||||
|
||||
def get_security_definition(self, auto_schema):
|
||||
from oauth2_provider.scopes import get_scopes_backend
|
||||
|
||||
from drf_spectacular.settings import spectacular_settings
|
||||
from oauth2_provider.scopes import get_scopes_backend
|
||||
|
||||
flows = {}
|
||||
for flow_type in spectacular_settings.OAUTH2_FLOWS:
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from collections import OrderedDict
|
||||
import logging.config
|
||||
import sys
|
||||
|
||||
from collections import OrderedDict
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
import environ
|
||||
|
|
@ -21,8 +20,9 @@ LOGLEVEL = env("LOGLEVEL", default="info").upper()
|
|||
|
||||
if env("FUNKWHALE_SENTRY_DSN", default=None) is not None:
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.django import DjangoIntegration
|
||||
from sentry_sdk.integrations.celery import CeleryIntegration
|
||||
from sentry_sdk.integrations.django import DjangoIntegration
|
||||
|
||||
from funkwhale_api import __version__ as version
|
||||
|
||||
sentry_sdk.init(
|
||||
|
|
@ -686,7 +686,7 @@ if AUTH_LDAP_ENABLED:
|
|||
# This way, we don't need the dependency unless someone
|
||||
# actually enables the LDAP support
|
||||
import ldap
|
||||
from django_auth_ldap.config import LDAPSearch, LDAPSearchUnion, GroupOfNamesType
|
||||
from django_auth_ldap.config import GroupOfNamesType, LDAPSearch, LDAPSearchUnion
|
||||
|
||||
# Add LDAP to the authentication backends
|
||||
AUTHENTICATION_BACKENDS += ("django_auth_ldap.backend.LDAPBackend",)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ Local settings
|
|||
- Add django-extensions as app
|
||||
"""
|
||||
|
||||
from .common import * # noqa
|
||||
from funkwhale_api import __version__ as funkwhale_version
|
||||
|
||||
from .common import * # noqa
|
||||
|
||||
# DEBUG
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ from __future__ import unicode_literals
|
|||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url
|
||||
from django.urls import include, path
|
||||
from django.conf.urls.static import static
|
||||
from funkwhale_api.common import admin
|
||||
from django.urls import include, path
|
||||
from django.views import defaults as default_views
|
||||
|
||||
from config import plugins
|
||||
from funkwhale_api.common import admin
|
||||
|
||||
plugins_patterns = plugins.trigger_filter(plugins.URLS, [], enabled=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ from django.conf.urls import include, url
|
|||
|
||||
from funkwhale_api.activity import views as activity_views
|
||||
from funkwhale_api.audio import views as audio_views
|
||||
from funkwhale_api.common import views as common_views
|
||||
from funkwhale_api.common import routers as common_routers
|
||||
from funkwhale_api.common import views as common_views
|
||||
from funkwhale_api.music import views
|
||||
from funkwhale_api.playlists import views as playlists_views
|
||||
from funkwhale_api.tags import views as tags_views
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ from funkwhale_api.audio import spa_views as audio_spa_views
|
|||
from funkwhale_api.federation import spa_views as federation_spa_views
|
||||
from funkwhale_api.music import spa_views
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
urls.re_path(
|
||||
r"^library/tracks/(?P<pk>\d+)/?$", spa_views.library_track, name="library_track"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue