Add pyright ignore comments for specific warnings

Added `# pyright: ignore` comments to suppress warnings related to optional member access and untyped function decorators. This ensures cleaner output during static type checking without altering functionality.
This commit is contained in:
2025-04-23 18:13:21 +02:00
parent 8c8963f86a
commit a2b376c49f

View File

@@ -22,13 +22,13 @@ class MyCog(discord.Cog):
@discord.Cog.listener() @discord.Cog.listener()
async def on_ready(self) -> None: async def on_ready(self) -> None:
print(f"Logged in as {bot.user} (ID: {bot.user.id})") print(f"Logged in as {bot.user} (ID: {bot.user.id})") # pyright: ignore [reportOptionalMemberAccess]
print("------") print("------")
self.progress_bar_manager = await ProgressBarManager(self.bot) self.progress_bar_manager = await ProgressBarManager(self.bot)
self.progress_bar = await self.progress_bar_manager.progress_bar("green", length=10) self.progress_bar = await self.progress_bar_manager.progress_bar("green", length=10)
print("Progress bar manager loaded.") print("Progress bar manager loaded.")
@discord.slash_command() @discord.slash_command() # pyright: ignore [reportUntypedFunctionDecorator]
async def get_progress_bar(self, ctx: discord.ApplicationContext, percent: float | None = None) -> None: async def get_progress_bar(self, ctx: discord.ApplicationContext, percent: float | None = None) -> None:
"""Send a progress bar message.""" """Send a progress bar message."""
if percent is None: if percent is None: