mirror of
https://github.com/Paillat-dev/discord-progress-bar.git
synced 2026-01-02 01:06:18 +00:00
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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user