Skip to content

Commit d7c96e2

Browse files
committedNov 15, 2022
fix lint
1 parent ea537d0 commit d7c96e2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
 

‎channels/consumer.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ async def __call__(self, scope, receive, send):
5050
# Handler to call when dispatch task is cancelled
5151
cancel_callback = None
5252
try:
53-
if callable(self.channel_layer.clean_channel):
54-
cancel_callback = functools.partial(self.channel_layer.clean_channel, self.channel_name)
53+
if callable(self.channel_layer.clean_channel):
54+
cancel_callback = functools.partial(
55+
self.channel_layer.clean_channel, self.channel_name
56+
)
5557
except AttributeError:
56-
pass
58+
pass
5759
# Store send function
5860
if self._sync:
5961
self.base_send = async_to_sync(send)
@@ -63,7 +65,9 @@ async def __call__(self, scope, receive, send):
6365
try:
6466
if self.channel_layer is not None:
6567
await await_many_dispatch(
66-
[receive, self.channel_receive], self.dispatch, cancel_callback=cancel_callback
68+
[receive, self.channel_receive],
69+
self.dispatch,
70+
cancel_callback=cancel_callback,
6771
)
6872
else:
6973
await await_many_dispatch([receive], self.dispatch)

0 commit comments

Comments
 (0)
Failed to load comments.