🐛 Fix type ignore comments in components and view

This commit is contained in:
2025-03-29 16:32:35 +01:00
parent e9cec84d5b
commit 87c7211ab1
2 changed files with 3 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ class ReactiveSelect(discord.ui.Select, Reactive): # pyright: ignore[reportUnsa
disabled: MaybeReactiveValue[bool] = False, disabled: MaybeReactiveValue[bool] = False,
row: MaybeReactiveValue[int | None] = None, row: MaybeReactiveValue[int | None] = None,
) -> None: ) -> None:
discord.ui.Select.__init__(self) # pyright: ignore [reportUnknownMemberType, reportArgumentType] discord.ui.Select.__init__(self) # pyright: ignore [reportUnknownMemberType]
Reactive.__init__(self) Reactive.__init__(self)
self.add_reactive("placeholder", placeholder) self.add_reactive("placeholder", placeholder)
self.add_reactive("min_values", min_values) self.add_reactive("min_values", min_values)

View File

@@ -53,9 +53,9 @@ class ReactiveView(discord.ui.View):
if not editable: if not editable:
raise ValueError("View has no editable (not yet sent?), can't refresh") raise ValueError("View has no editable (not yet sent?), can't refresh")
if embeds := await self._get_embeds(): if embeds := await self._get_embeds():
await editable.edit(content=await self._get_content(), embeds=embeds, view=self) await editable.edit(content=await self._get_content(), embeds=embeds, view=self) # pyright: ignore[reportUnknownMemberType]
else: else:
await editable.edit(content=await self._get_content(), view=self) await editable.edit(content=await self._get_content(), view=self) # pyright: ignore[reportUnknownMemberType]
async def send(self, ctx: discord.ApplicationContext | discord.Interaction, ephemeral: bool = False) -> None: async def send(self, ctx: discord.ApplicationContext | discord.Interaction, ephemeral: bool = False) -> None:
"""Send the view to a context.""" """Send the view to a context."""