Skip to content

Commit

Permalink
Add type ignores for pyright flagging property assignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius committed Mar 19, 2024
1 parent 68c3194 commit 81c8097
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions exts/emoji_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ class AddEmojiButton(discord.ui.Button["AddEmojisView"]):
"""

def __init__(self, *, guild: discord.Guild, emoji: discord.PartialEmoji, **kwargs: Any) -> None:
super().__init__(**kwargs)
super().__init__(emoji=emoji, **kwargs)
self.guild = guild
self.emoji = emoji
self.new_emoji: discord.Emoji | None = None

async def callback(self, interaction: discord.Interaction) -> None:
Expand All @@ -104,7 +103,7 @@ async def callback(self, interaction: discord.Interaction) -> None:
else:
await self.new_emoji.delete()

self.style = discord.ButtonStyle.secondary
self.style = discord.ButtonStyle.secondary # type: ignore
await interaction.response.edit_message(view=self.view)
await interaction.followup.send(f"Deleted this emoji from the server: {self.emoji}", ephemeral=True)

Expand Down
2 changes: 1 addition & 1 deletion exts/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __init__(
nodes: list[wavelink.Node] | None = None,
) -> None:
super().__init__(client, channel, nodes=nodes)
self.autoplay = wavelink.AutoPlayMode.partial
self.autoplay = wavelink.AutoPlayMode.partial # type: ignore


class MusicCog(commands.Cog, name="Music"):
Expand Down
4 changes: 2 additions & 2 deletions exts/todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ async def callback(self, interaction: core.Interaction) -> None: # type: ignore
self.label = "Mark as complete"
completion_status = "incomplete"
else:
self.style = discord.ButtonStyle.grey
self.label = "Mark as incomplete"
self.style = discord.ButtonStyle.grey # type: ignore
self.label = "Mark as incomplete" # type: ignore
completion_status = "complete"

# Adjust the view to have and display the updated to-do item, and let the user know it's updated.
Expand Down

0 comments on commit 81c8097

Please sign in to comment.