Skip to content

Commit

Permalink
Lint + isort
Browse files Browse the repository at this point in the history
  • Loading branch information
nospame committed Sep 9, 2024
1 parent 22f8ecc commit b014f2a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
17 changes: 11 additions & 6 deletions corehq/ex-submodules/soil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
from django.conf import settings
from django.core import cache
from django.core.cache import DEFAULT_CACHE_ALIAS
from django.urls import reverse
from django.http import HttpResponse, StreamingHttpResponse
from django.urls import reverse

from django_transfer import TransferHttpResponse
from soil.progress import get_task_progress, get_multiple_task_progress, set_task_progress
from corehq.blobs import get_blob_db, CODES

from soil.progress import (
get_multiple_task_progress,
get_task_progress,
set_task_progress,
)

from corehq.blobs import CODES, get_blob_db
from corehq.const import ONE_DAY

GLOBAL_RW = stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IROTH | stat.S_IWOTH
Expand Down Expand Up @@ -70,7 +75,7 @@ def get_cache(self):
return cache.caches[self.cache_backend]

def get_content(self):
raise NotImplemented("Use CachedDownload or FileDownload!")
raise NotImplementedError("Use CachedDownload or FileDownload!")

def get_filename(self):
"""
Expand Down Expand Up @@ -237,8 +242,8 @@ def __init__(self, filename, mimetype="text/plain",
transfer_encoding=None, extras=None, download_id=None, cache_backend=SOIL_DEFAULT_CACHE,
use_transfer=False, content_type=None, owner_ids=None):
super(FileDownload, self).__init__(
content_type if content_type else mimetype, content_disposition,
transfer_encoding, extras, download_id, cache_backend, owner_ids=owner_ids)
content_type if content_type else mimetype, content_disposition,
transfer_encoding, extras, download_id, cache_backend, owner_ids=owner_ids)
self.filename = filename
self.use_transfer = use_transfer

Expand Down
11 changes: 6 additions & 5 deletions corehq/messaging/smsbackends/tropo/views.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import json
from corehq.apps.sms.api import incoming as incoming_sms
from datetime import datetime

from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt

from corehq.apps.ivr.models import Call
from corehq.apps.sms.api import incoming as incoming_sms
from corehq.apps.sms.models import INCOMING, PhoneNumber
from corehq.apps.sms.util import strip_plus
from corehq.apps.sms.views import IncomingBackendView
from corehq.messaging.smsbackends.tropo.models import SQLTropoBackend
from datetime import datetime
from corehq.apps.sms.util import strip_plus


def sms_in(request, backend_id=None):
Expand All @@ -25,7 +26,7 @@ def sms_in(request, backend_id=None):
numberToDial = params["numberToDial"]
msg = params["msg"]
t = Tropo()
t.call(to = numberToDial, network = "SMS")
t.call(to=numberToDial, network="SMS")
t.say(msg)
return HttpResponse(t.RenderJson(), content_type='application/json')
# Handle incoming SMS
Expand Down

0 comments on commit b014f2a

Please sign in to comment.