mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Merge branch 'cleanup-unused-imports' into 'master'
[REMOVE] Unused imports See merge request allianceauth/allianceauth!1684
This commit is contained in:
commit
02214b74d0
@ -1,7 +1,6 @@
|
|||||||
from django.apps import apps
|
from django.apps import apps
|
||||||
from allianceauth.authentication.models import User
|
from allianceauth.authentication.models import User
|
||||||
from esi.models import Token
|
from allianceauth.analytics.utils import install_stat_users, install_stat_addons
|
||||||
from allianceauth.analytics.utils import install_stat_users, install_stat_tokens, install_stat_addons
|
|
||||||
|
|
||||||
from django.test.testcases import TestCase
|
from django.test.testcases import TestCase
|
||||||
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
from django.urls import include
|
|
||||||
from django.contrib.auth.decorators import user_passes_test
|
|
||||||
from django.core.exceptions import PermissionDenied
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from typing import Callable, Iterable, Optional
|
from typing import Callable, Iterable, Optional
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ from django.db import models, transaction
|
|||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from allianceauth.eveonline.models import EveCharacter, EveCorporationInfo, EveAllianceInfo, EveFactionInfo
|
from allianceauth.eveonline.models import EveCharacter, EveCorporationInfo, EveAllianceInfo, EveFactionInfo
|
||||||
from allianceauth.notifications import notify
|
from allianceauth.notifications import notify
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
from .managers import CharacterOwnershipManager, StateManager
|
from .managers import CharacterOwnershipManager, StateManager
|
||||||
|
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
from django.db.models.signals import (
|
|
||||||
m2m_changed,
|
|
||||||
post_save,
|
|
||||||
pre_delete,
|
|
||||||
pre_save
|
|
||||||
)
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
from unittest import mock
|
|
||||||
from allianceauth.authentication.middleware import UserSettingsMiddleware
|
from allianceauth.authentication.middleware import UserSettingsMiddleware
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
|
@ -4,16 +4,10 @@ from allianceauth.eveonline.models import (
|
|||||||
EveCorporationInfo,
|
EveCorporationInfo,
|
||||||
EveAllianceInfo
|
EveAllianceInfo
|
||||||
)
|
)
|
||||||
from django.db.models.signals import (
|
from django.db.models.signals import post_save
|
||||||
pre_save,
|
|
||||||
post_save,
|
|
||||||
pre_delete,
|
|
||||||
m2m_changed
|
|
||||||
)
|
|
||||||
from allianceauth.tests.auth_utils import AuthUtils
|
from allianceauth.tests.auth_utils import AuthUtils
|
||||||
|
|
||||||
from django.test.testcases import TestCase
|
from django.test.testcases import TestCase
|
||||||
from unittest.mock import Mock
|
|
||||||
from . import patch
|
from . import patch
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ from django.conf import settings
|
|||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth import authenticate, login
|
from django.contrib.auth import authenticate, login
|
||||||
from django.contrib.auth.decorators import login_required, user_passes_test
|
from django.contrib.auth.decorators import login_required, user_passes_test
|
||||||
from django.contrib.auth.models import User
|
|
||||||
from django.core import signing
|
from django.core import signing
|
||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
from django.shortcuts import redirect, render
|
from django.shortcuts import redirect, render
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# myapp/tests/test_tasks.py
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
@ -5,9 +5,6 @@ Form widgets for custom_css app
|
|||||||
# Django
|
# Django
|
||||||
from django import forms
|
from django import forms
|
||||||
|
|
||||||
# Alliance Auth
|
|
||||||
from allianceauth.custom_css.models import CustomCSS
|
|
||||||
|
|
||||||
|
|
||||||
class CssEditorWidget(forms.Textarea):
|
class CssEditorWidget(forms.Textarea):
|
||||||
"""
|
"""
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.contrib.auth.models import Group
|
from django.contrib.auth.models import Group
|
||||||
from django.db import transaction
|
|
||||||
|
|
||||||
from allianceauth.tests.auth_utils import AuthUtils
|
from allianceauth.tests.auth_utils import AuthUtils
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
from ...models import EveCharacter, EveCorporationInfo, EveAllianceInfo
|
|
||||||
from .. import dotlan, zkillboard, evewho, eveimageserver
|
from .. import dotlan, zkillboard, evewho, eveimageserver
|
||||||
from ...templatetags import evelinks
|
|
||||||
|
|
||||||
|
|
||||||
class TestEveWho(TestCase):
|
class TestEveWho(TestCase):
|
||||||
|
@ -8,7 +8,7 @@ from django.contrib.auth.decorators import login_required
|
|||||||
from django.contrib.auth.decorators import permission_required
|
from django.contrib.auth.decorators import permission_required
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ValidationError, ObjectDoesNotExist
|
from django.core.exceptions import ValidationError, ObjectDoesNotExist
|
||||||
from django.shortcuts import render, redirect, get_object_or_404, Http404
|
from django.shortcuts import render, redirect, get_object_or_404
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from esi.decorators import token_required
|
from esi.decorators import token_required
|
||||||
|
@ -186,7 +186,7 @@ class TestRenderDefaultMenu(TestCase):
|
|||||||
classes = "fa-solid fa-users-gear"
|
classes = "fa-solid fa-users-gear"
|
||||||
url_name = "groupmanagement:management"
|
url_name = "groupmanagement:management"
|
||||||
|
|
||||||
def render(Self, request):
|
def render(self, request):
|
||||||
# simulate no perms
|
# simulate no perms
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from unittest.mock import patch, Mock
|
from unittest.mock import patch
|
||||||
|
|
||||||
from django.test import TestCase, override_settings
|
from django.test import TestCase, override_settings
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from unittest.mock import patch, Mock
|
from unittest.mock import patch
|
||||||
|
|
||||||
from django.test import TestCase, RequestFactory
|
from django.test import TestCase, RequestFactory
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from django.contrib.auth.decorators import login_required, permission_required
|
from django.contrib.auth.decorators import login_required, permission_required
|
||||||
from django.contrib.auth.models import Permission, User
|
from django.contrib.auth.models import Permission
|
||||||
from django.db.models import Count
|
from django.db.models import Count
|
||||||
from django.shortcuts import render, Http404
|
from django.shortcuts import render, Http404
|
||||||
|
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
from string import Formatter
|
from string import Formatter
|
||||||
from django.urls import include, re_path
|
|
||||||
from typing import Iterable, Optional
|
from typing import Iterable, Optional
|
||||||
|
|
||||||
from django.conf import settings
|
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
|
||||||
from django.template.loader import render_to_string
|
|
||||||
from django.urls import include, re_path
|
|
||||||
from django.utils.functional import cached_property
|
|
||||||
|
|
||||||
from allianceauth.hooks import get_hooks
|
from allianceauth.hooks import get_hooks
|
||||||
from allianceauth.menu.hooks import MenuItemHook
|
from allianceauth.menu.hooks import MenuItemHook
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
@ -37,7 +37,6 @@ import random
|
|||||||
|
|
||||||
from django.contrib.auth.models import User, Group
|
from django.contrib.auth.models import User, Group
|
||||||
|
|
||||||
from allianceauth.services.modules.discord.models import DiscordUser
|
|
||||||
from allianceauth.utils.cache import get_redis_client
|
from allianceauth.utils.cache import get_redis_client
|
||||||
|
|
||||||
logger = logging.getLogger('allianceauth')
|
logger = logging.getLogger('allianceauth')
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import logging
|
import logging
|
||||||
import requests
|
|
||||||
import re
|
import re
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.shortcuts import render, redirect
|
from django.shortcuts import redirect
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from .manager import DiscourseManager
|
from .manager import DiscourseManager
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
from django.conf import settings
|
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
|
||||||
from allianceauth.services.hooks import NameFormatter
|
from allianceauth.services.hooks import NameFormatter
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
from unittest import mock
|
|
||||||
|
|
||||||
from django.contrib.auth.models import User, Group, Permission
|
from django.contrib.auth.models import User, Group, Permission
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
from allianceauth.eveonline.models import (
|
|
||||||
EveCorporationInfo, EveAllianceInfo, EveCharacter
|
|
||||||
)
|
|
||||||
|
|
||||||
from .auth_utils import AuthUtils
|
from .auth_utils import AuthUtils
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
from typing import List, Iterable, Callable
|
from typing import List, Iterable, Callable
|
||||||
|
|
||||||
from django.urls import include
|
|
||||||
import esi.urls
|
import esi.urls
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user