From 633192b3cda8d9a8cbe294960604ef7d46ce6ea1 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Fri, 22 Jun 2018 16:56:02 +0200 Subject: [lint] Replace equality comparisons to singletons Restrict the values accepted by comparisons with booleans to be actual booleans. Minor breaking of undocumented behaviour in permissions; the value to set bits to must be booleans (as indicated by the type error thrown). --- discord/gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'discord/gateway.py') diff --git a/discord/gateway.py b/discord/gateway.py index b3fca3a3..caca7e09 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -363,7 +363,7 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol): return if op == self.INVALIDATE_SESSION: - if data == True: + if data is True: await asyncio.sleep(5.0, loop=self.loop) await self.close() raise ResumeWebSocket(self.shard_id) -- cgit v1.2.3