Skip to content

Commit

Permalink
Format + isort
Browse files Browse the repository at this point in the history
  • Loading branch information
milesbxf committed Sep 25, 2019
1 parent 3436e73 commit 71f9246
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions response/migrations/0009_commschannel_channel_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"""

from django.conf import settings
from django.db import migrations, models, OperationalError

from django.db import OperationalError, migrations, models

from response.slack.client import SlackError

Expand All @@ -23,7 +22,9 @@ def set_comms_channel_names(apps, schema_editor):
CommsChannel = apps.get_model("response", "CommsChannel")
for comms_channel in CommsChannel.objects.all().iterator():
try:
channel_name = settings.SLACK_CLIENT.get_channel_name(comms_channel.channel_id)
channel_name = settings.SLACK_CLIENT.get_channel_name(
comms_channel.channel_id
)
except SlackError as e:
raise OperationalError(
f"""Error connecting to the Slack API: {str(e)}
Expand Down
2 changes: 1 addition & 1 deletion response/slack/event_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
handle_keywords,
slack_event,
)
from response.slack.models import PinnedMessage, UserStats, CommsChannel
from response.slack.models import CommsChannel, PinnedMessage, UserStats

logger = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion tests/slack/test_channel_rename.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import pytest

from response.slack.event_handlers import handle_channel_rename

from tests.factories import IncidentFactory


Expand Down

0 comments on commit 71f9246

Please sign in to comment.