Skip to content

Commit

Permalink
style(ruff): remove lint isort rule because of inconsistent results
Browse files Browse the repository at this point in the history
KK-1113
  • Loading branch information
nikomakela committed Dec 19, 2024
1 parent 2cb2341 commit bc3e629
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion children/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from users.schema import GuardianNode, LanguageEnum, validate_guardian_data
from users.utils import get_communication_unsubscribe_ui_url

from .models import Child, postal_code_validator, Relationship
from .models import Child, Relationship, postal_code_validator

User = get_user_model()

Expand Down
2 changes: 1 addition & 1 deletion common/tests/test_qrcode_service.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from common.qrcode_service import create_qrcode, QRCodeFileFormatEnum
from common.qrcode_service import QRCodeFileFormatEnum, create_qrcode
from kukkuu.service import get_hashid_service


Expand Down
4 changes: 2 additions & 2 deletions events/notification_service.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import Tuple, TYPE_CHECKING
from typing import TYPE_CHECKING, Tuple

from django.conf import settings

from common.qrcode_service import create_qrcode, MIME_TYPES, QRCodeFileFormatEnum
from common.qrcode_service import MIME_TYPES, QRCodeFileFormatEnum, create_qrcode
from events.consts import NotificationType
from events.utils import send_event_notifications_to_guardians

Expand Down
2 changes: 1 addition & 1 deletion events/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
from collections.abc import Iterable
from datetime import datetime
from typing import List, Optional, TYPE_CHECKING, Union
from typing import TYPE_CHECKING, List, Optional, Union

from django.conf import settings
from django.db.models import QuerySet
Expand Down
2 changes: 1 addition & 1 deletion gdpr/service.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from typing import Optional, TYPE_CHECKING
from typing import TYPE_CHECKING, Optional

from helsinki_gdpr.types import ErrorResponse

Expand Down
2 changes: 1 addition & 1 deletion hel_django_auditlog_extra/tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from django.db.models.signals import pre_save

from hel_django_auditlog_extra.context import (
AuditLogContextService,
_set_request_path,
auditlog_request_context_value,
AuditLogContextService,
set_request_path,
)

Expand Down
2 changes: 1 addition & 1 deletion hel_django_auditlog_extra/tests/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from django.test import RequestFactory

from hel_django_auditlog_extra.mixins import (
_auditlog_accessed_sent,
AuditlogAdminViewAccessLogMixin,
_auditlog_accessed_sent,
)
from hel_django_auditlog_extra.tests.models import DummyTestModel

Expand Down
2 changes: 1 addition & 1 deletion kukkuu/tests/utils/jwt_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import time
import uuid
from typing import Optional, TYPE_CHECKING
from typing import TYPE_CHECKING, Optional

from django.conf import settings
from jose import jwt
Expand Down
2 changes: 1 addition & 1 deletion kukkuu_mailer_admin/admin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from mailer.admin import MessageAdmin, MessageLogAdmin, show_to
from mailer.models import Message, MessageLog, RESULT_CODES
from mailer.models import RESULT_CODES, Message, MessageLog

from hel_django_auditlog_extra.mixins import AuditlogAdminViewAccessLogMixin

Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ ignore = [
"E117", # "Over-indented"
]

[tool.ruff.lint.isort]
# isort options for ruff:
# https://docs.astral.sh/ruff/settings/#lintisort
order-by-type = false # Don't use type (i.e. case) to sort imports
# Removed tool.ruff.lint.isort block, because the results were inconsistent.
# [tool.ruff.lint.isort]
# # isort options for ruff:
# # https://docs.astral.sh/ruff/settings/#lintisort
# order-by-type = false # Don't use type (i.e. case) to sort imports

[tool.ruff.format]
docstring-code-format = true # Format code in docstrings
Expand Down
2 changes: 1 addition & 1 deletion reports/api.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from django.db.models import Prefetch
from drf_spectacular.utils import (
OpenApiExample,
extend_schema,
extend_schema_serializer,
extend_schema_view,
OpenApiExample,
)
from rest_framework import mixins, viewsets

Expand Down
2 changes: 1 addition & 1 deletion subscriptions/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, TYPE_CHECKING, Union
from typing import TYPE_CHECKING, Optional, Union

from django.core.exceptions import ValidationError
from django.db import models
Expand Down
2 changes: 1 addition & 1 deletion users/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
from datetime import datetime
from typing import Optional, TYPE_CHECKING, Union
from typing import TYPE_CHECKING, Optional, Union

from django.conf import settings
from django.contrib.auth import get_user_model
Expand Down

0 comments on commit bc3e629

Please sign in to comment.