From a2b376c49f07915a90c10ec151e51f04d9e392dc Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Wed, 23 Apr 2025 18:13:21 +0200 Subject: [PATCH] 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. --- examples/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/basic.py b/examples/basic.py index 8fef802..3a06a27 100644 --- a/examples/basic.py +++ b/examples/basic.py @@ -22,13 +22,13 @@ class MyCog(discord.Cog): @discord.Cog.listener() 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("------") self.progress_bar_manager = await ProgressBarManager(self.bot) self.progress_bar = await self.progress_bar_manager.progress_bar("green", length=10) 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: """Send a progress bar message.""" if percent is None: