Skip to content

Commit

Permalink
style: fix import sorting
Browse files Browse the repository at this point in the history
KK-1113
  • Loading branch information
nikomakela committed Dec 20, 2024
1 parent 46c94d8 commit 5b61cc9
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion children/notifications.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.utils.translation import gettext_lazy as _

from django_ilmoitin.dummy_context import dummy_context
from django_ilmoitin.registry import notifications

from projects.factories import ProjectFactory
from users.factories import GuardianFactory

Expand Down
2 changes: 1 addition & 1 deletion children/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from django.db.models import F, Q
from django.utils import timezone as django_utils_timezone
from django.utils.timezone import localdate, make_aware
from django_ilmoitin.utils import send_notification
from graphene import relay
from graphene_django import DjangoConnectionField
from graphene_django.types import DjangoObjectType
Expand All @@ -21,7 +22,6 @@
set_obj_languages_spoken_at_home,
)
from common.utils import login_required, map_enums_to_values_in_kwargs, update_object
from django_ilmoitin.utils import send_notification
from events.models import Event, EventGroup, EventQueryset, Occurrence
from hel_django_auditlog_extra.graphene_decorators import auditlog_access
from kukkuu.exceptions import (
Expand Down
2 changes: 1 addition & 1 deletion common/tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.core import mail
from django_ilmoitin.models import NotificationTemplate
from parler.utils.context import switch_language
from requests.exceptions import HTTPError

from django_ilmoitin.models import NotificationTemplate
from kukkuu.consts import GENERAL_ERROR, PERMISSION_DENIED_ERROR


Expand Down
4 changes: 2 additions & 2 deletions events/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django_ilmoitin.dummy_context import dummy_context
from django_ilmoitin.registry import notifications

from children.factories import ChildWithGuardianFactory
from common.utils import get_global_id
from django_ilmoitin.dummy_context import dummy_context
from django_ilmoitin.registry import notifications
from events.consts import NotificationType
from events.factories import (
EnrolmentFactory,
Expand Down
2 changes: 1 addition & 1 deletion events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from django.conf import settings
from django.db.models import QuerySet
from django.utils import timezone
from django_ilmoitin.utils import send_notification
from parler.utils.context import switch_language

from common.utils import get_global_id
from django_ilmoitin.utils import send_notification
from users.utils import get_communication_unsubscribe_ui_url

if TYPE_CHECKING:
Expand Down
1 change: 0 additions & 1 deletion importers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from django.urls import path, reverse
from django.utils.translation import gettext_lazy as _
from django.utils.translation import ngettext_lazy

from django_ilmoitin.admin import NotificationTemplateAdmin
from django_ilmoitin.models import NotificationTemplate

Expand Down
5 changes: 2 additions & 3 deletions importers/notification_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.db import transaction
from parler.utils.context import switch_language
from requests import RequestException

from django_ilmoitin.dummy_context import dummy_context
from django_ilmoitin.models import NotificationTemplate, NotificationTemplateException
from django_ilmoitin.utils import render_notification_template
from parler.utils.context import switch_language
from requests import RequestException

# {
# "<notification type>": {
Expand Down
2 changes: 1 addition & 1 deletion importers/tests/test_notification_importer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import pytest
import responses
from django.conf import settings
from django_ilmoitin.models import NotificationTemplate

from common.tests.utils import create_notification_template_in_language
from django_ilmoitin.models import NotificationTemplate
from events.notifications import NotificationType

from ..notification_importer import NotificationImporter
Expand Down
4 changes: 2 additions & 2 deletions messaging/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from django.conf import settings
from django.utils import timezone
from parler.utils.context import switch_language

from django_ilmoitin.utils import Message as MailerMessage
from django_ilmoitin.utils import send_all, send_mail
from parler.utils.context import switch_language

from kukkuu.notification_service import send_sms_notification
from messaging.exceptions import AlreadySentError
from users.models import Guardian
Expand Down
4 changes: 2 additions & 2 deletions subscriptions/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from django.utils import timezone
from django.utils.translation import gettext_lazy as _

from children.factories import ChildWithGuardianFactory
from django_ilmoitin.dummy_context import dummy_context
from django_ilmoitin.registry import notifications

from children.factories import ChildWithGuardianFactory
from events.factories import EventFactory, OccurrenceFactory
from events.utils import (
get_event_ui_url,
Expand Down
4 changes: 2 additions & 2 deletions users/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
from django.http import HttpResponse
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
from django_ilmoitin.models import NotificationTemplate
from django_ilmoitin.utils import render_notification_template
from guardian.admin import GuardedModelAdmin

from children.models import Relationship
from django_ilmoitin.models import NotificationTemplate
from django_ilmoitin.utils import render_notification_template
from hel_django_auditlog_extra.mixins import AuditlogAdminViewAccessLogMixin
from languages.models import Language
from projects.models import Project
Expand Down
1 change: 0 additions & 1 deletion users/notifications.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from datetime import date

from django.utils.translation import gettext_lazy as _

from django_ilmoitin.dummy_context import dummy_context
from django_ilmoitin.registry import notifications

Expand Down
2 changes: 1 addition & 1 deletion users/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from django.core.paginator import Paginator
from django.db.models import QuerySet
from django.template import Context, Template

from django_ilmoitin.utils import send_notification

from users.models import Guardian
from users.utils import get_communication_unsubscribe_ui_url

Expand Down

0 comments on commit 5b61cc9

Please sign in to comment.