@@ -552,9 +552,9 @@ async def _send_packet(self, eio_sid, pkt):
552552
553553 # Only append offset if not already there (binary packets)
554554 last_is_offset = (
555- isinstance (pkt .data , list ) and len (pkt .data ) > 0 and
556- isinstance (pkt .data [- 1 ], str ) and
557- len (pkt .data [- 1 ]) == 7 )
555+ isinstance (pkt .data , list ) and len (pkt .data ) > 0
556+ and isinstance (pkt .data [- 1 ], str )
557+ and len (pkt .data [- 1 ]) == 7 )
558558 if not last_is_offset :
559559 pkt .data = list (pkt .data ) + [offset ]
560560
@@ -592,10 +592,10 @@ async def _handle_connect(self, eio_sid, namespace, data):
592592 sid = recovery_info ['sid' ]
593593 # Reconnect with the same sid
594594 ns_allowed = (
595- namespace in self .handlers or
596- namespace in self .namespace_handlers or
597- self .namespaces == '*' or
598- namespace in self .namespaces )
595+ namespace in self .handlers
596+ or namespace in self .namespace_handlers
597+ or self .namespaces == '*'
598+ or namespace in self .namespaces )
599599 if ns_allowed :
600600 # Re-establish connection with recovered sid
601601 try :
@@ -622,10 +622,10 @@ async def _handle_connect(self, eio_sid, namespace, data):
622622 # Create new connection if recovery didn't work
623623 if sid is None :
624624 ns_allowed = (
625- namespace in self .handlers or
626- namespace in self .namespace_handlers or
627- self .namespaces == '*' or
628- namespace in self .namespaces )
625+ namespace in self .handlers
626+ or namespace in self .namespace_handlers
627+ or self .namespaces == '*'
628+ or namespace in self .namespaces )
629629 if ns_allowed :
630630 sid = await self .manager .connect (eio_sid , namespace )
631631 if sid is None :
0 commit comments