junepark678 / GIRRewrite

Consider using identity comparison with singleton PTC-W0068
Bug risk
Major
a year agoa year old
Comparison to singleton True should be expr is True
495
496        content_added = False
497        embed = discord.Embed(color=discord.Color.random())
498        embed.set_author(name=f"{last_message.author.display_name} {'edited' if last_message.edited_at == True else 'deleted'} a message", icon_url=last_message.author.display_avatar.url)499        if last_message.content:
500            embed.description = last_message.content[:2000] + "..." if len(last_message.content) > 2000 else last_message.content
501            content_added = True
Comparison to singleton None should be expr is None
1439    @bridge.bridge_command(name='search', description=loc["descriptions"]["search"])
1440    async def search(self, ctx, *, keyword=None):
1441        # Search from Youtube and returns 10 songs
1442        if keyword == None:1443            return await self.respond(ctx.ctx, loc["messages"]["play_no_keyword"], color=0xff0000)
1444        originalkeyword = keyword
1445        keyword = "ytsearch10:" + keyword
Comparison to singleton None should be expr is None
1344        A list of these sites can be found here: https://rg3.github.io/youtube-dl/supportedsites.html
1345        """
1346
1347        if search == None:1348            return await self.respond(ctx.ctx, loc["messages"]["provide_url"], color=0xff0000)
1349        # Joins the channel if it hasn't
1350        if not ctx.voice_state.voice:
Comparison to singleton None should be expr is None
 735
 736        ctx = self.ctx
 737        search = self.data[int(self.values[0])]["url"]
 738        if search == None: 739            return await self.respond(interaction.message, loc["messages"]["provide_url"], color=0xff0000)
 740        # Joins the channel if it hasn't
 741        if not ctx.voice_state.voice: