Skip to content

Commit

Permalink
appease pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
asedeno committed Feb 11, 2023
1 parent c562817 commit c58e25e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions roost_backend/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, *args, **kwargs):
self.active_tails = set()

def receive_json(self, content, **kwargs):
DISPATCH_DICT = {
dispatch_dict = {
'ping': self.on_ping,
'get-messages': self.on_get_messages,
'new-tail': self.on_new_tail,
Expand All @@ -43,13 +43,13 @@ def receive_json(self, content, **kwargs):
async_to_sync(self.channel_layer.group_add)(self.groups[-1], self.channel_name)
self.send_json({
'type': 'ready',
'msgs': list(DISPATCH_DICT.keys())
'msgs': list(dispatch_dict.keys())
})
return

# dispatch on message type, close if unrecognized.
try:
DISPATCH_DICT[msg_type](content)
dispatch_dict[msg_type](content)
except (KeyError, NotImplementedError, self.BadMessage):
self.close(code=4005)

Expand Down
3 changes: 3 additions & 0 deletions roost_ng/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'roost_ng.settings')
django.setup()

# These imports can't happen before django.setup().
# pylint: disable=wrong-import-position
import roost_ng.routing
from roost_ng.middleware import DaphneRootPathForWebsockets
# pylint: enable=wrong-import-position


application = ProtocolTypeRouter({
Expand Down

0 comments on commit c58e25e

Please sign in to comment.