From b1e4b138c67b6d6be6316cf3dda78ea6c157e060 Mon Sep 17 00:00:00 2001 From: Teeh Amaral Date: Mon, 24 Jun 2024 22:08:13 -0300 Subject: [PATCH] code check --- temba/api/v2/views.py | 2 +- temba/classifiers/models.py | 8 ++++---- temba/flows/views.py | 4 ++-- temba/utils/tests.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/temba/api/v2/views.py b/temba/api/v2/views.py index ec3942a80b3..31ff74e9c68 100644 --- a/temba/api/v2/views.py +++ b/temba/api/v2/views.py @@ -65,6 +65,7 @@ from ...links.models import Link, LinkContacts from ...orgs.models import DEFAULT_FIELDS_PAYLOAD_LOOKUPS, DEFAULT_INDEXES_FIELDS_PAYLOAD_LOOKUPS, LOOKUPS from ...utils.gsm7 import replace_accented_chars +from ...utils.legacy import dates from ..models import SSLPermission from ..support import InvalidQueryError, csv_response_wrapper from .serializers import ( @@ -114,7 +115,6 @@ WorkspaceReadSerializer, ) from .validators import is_uuid_valid -from ...utils.legacy import dates class RootView(views.APIView): diff --git a/temba/classifiers/models.py b/temba/classifiers/models.py index 75e9d80fe1f..f0f1d246a4d 100644 --- a/temba/classifiers/models.py +++ b/temba/classifiers/models.py @@ -1,13 +1,14 @@ import logging import os -import pandas as pd from abc import ABCMeta -from django.conf import settings -from django.core.files.base import ContentFile +import pandas as pd from jellyfish import jaro_similarity from smartmin.models import SmartModel +from django.conf import settings +from django.core.files.base import ContentFile +from django.core.files.storage import default_storage as storage from django.db import models from django.template import Engine from django.urls import re_path, reverse @@ -19,7 +20,6 @@ from temba.utils.email import send_template_email from temba.utils.models import JSONField, TembaModel from temba.utils.uuid import uuid4 -from django.core.files.storage import default_storage as storage logger = logging.getLogger(__name__) diff --git a/temba/flows/views.py b/temba/flows/views.py index d45d3c73ffb..29fcccb805d 100644 --- a/temba/flows/views.py +++ b/temba/flows/views.py @@ -5,7 +5,6 @@ import iso8601 import regex import requests -from django.utils import timezone from django_redis import get_redis_connection from packaging.version import Version from simplejson import JSONDecodeError @@ -30,6 +29,7 @@ from django.http import Http404, HttpResponse, HttpResponseRedirect, JsonResponse from django.shortcuts import get_object_or_404 from django.urls import reverse +from django.utils import timezone from django.utils.encoding import force_str from django.utils.functional import cached_property from django.utils.text import slugify @@ -72,7 +72,7 @@ OrgPermsMixin, ) from temba.triggers.models import Trigger -from temba.utils import analytics, gettext, json, languages, on_transaction_commit, str_to_bool, build_flow_parameters +from temba.utils import analytics, build_flow_parameters, gettext, json, languages, on_transaction_commit, str_to_bool from temba.utils.fields import ( CheckboxWidget, CompletionTextarea, diff --git a/temba/utils/tests.py b/temba/utils/tests.py index 2d44075a6ce..0d69daabb53 100644 --- a/temba/utils/tests.py +++ b/temba/utils/tests.py @@ -32,10 +32,10 @@ from .cache import get_cacheable_result, incrby_existing from .celery import nonoverlapping_task from .dates import date_range, datetime_to_str, datetime_to_timestamp, timestamp_to_datetime -from .email import is_valid_address, send_simple_email, send_email_with_attachments +from .email import is_valid_address, send_email_with_attachments, send_simple_email from .export import TableExporter from .fields import NameValidator, validate_external_url -from .gsm7 import is_gsm7, replace_non_gsm7_accents, calculate_num_segments, replace_accented_chars +from .gsm7 import calculate_num_segments, is_gsm7, replace_accented_chars, replace_non_gsm7_accents from .http import http_headers from .locks import LockNotAcquiredException, NonBlockingLock from .models import patch_queryset_count