From 8cbd7d6aef6f8aca03d9885cd53ddce4df15fa0d Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Thu, 9 Jan 2025 16:31:32 -0500 Subject: [PATCH] style: format with ruff 0.9 --- commands/tools.py | 2 +- core.py | 4 ++-- youtubedl.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/tools.py b/commands/tools.py index be70e00..cf06c3b 100644 --- a/commands/tools.py +++ b/commands/tools.py @@ -46,7 +46,7 @@ async def lookup(message): embed.add_field(name="Application ID", value="`" + response["id"] + "`") embed.add_field( name="Public Bot", - value=f"{'`'+str(response['bot_public'])+'`' if 'bot_public' in response else 'No bot'}", + value=f"{'`' + str(response['bot_public']) + '`' if 'bot_public' in response else 'No bot'}", ) embed.add_field(name="Public Flags", value="`" + str(response["flags"]) + "`") embed.add_field( diff --git a/core.py b/core.py index 95e2347..b5de1ca 100644 --- a/core.py +++ b/core.py @@ -73,7 +73,7 @@ async def on_message(message, edited=False): end = time.time() if __debug__: debug( - f"reloaded {len(reloaded_modules)} modules in {round(end-start, 2)}s" + f"reloaded {len(reloaded_modules)} modules in {round(end - start, 2)}s" ) await utils.add_check_reaction(message) @@ -152,7 +152,7 @@ async def on_message(message, edited=False): except Exception as e: await utils.reply( message, - f"exception occurred while processing command: ```\n{"".join(traceback.format_exception(e)).replace("`", "\\`")}```", + f"exception occurred while processing command: ```\n{''.join(traceback.format_exception(e)).replace('`', '\\`')}```", ) raise e finally: diff --git a/youtubedl.py b/youtubedl.py index 2450f9c..20e00fe 100644 --- a/youtubedl.py +++ b/youtubedl.py @@ -114,7 +114,7 @@ class QueuedSong: url=self.player.original_url, description=( f"{'⏸️ ' if is_paused else ''}" - f"`[{'#'*int(progress * BAR_LENGTH)}{'-'*int((1 - progress) * BAR_LENGTH)}]` " + f"`[{'#' * int(progress * BAR_LENGTH)}{'-' * int((1 - progress) * BAR_LENGTH)}]` " + ( f"**{format_duration(int(self.player.original.progress))}** / **{format_duration(self.player.duration)}** (**{round(progress * 100)}%**)" if self.player.duration @@ -136,7 +136,7 @@ class QueuedSong: embed.add_field(name="Likes", value=f"{self.player.like_count:,}") embed.add_field(name="Views", value=f"{self.player.view_count:,}") embed.add_field(name="Published", value=f"") - embed.add_field(name="Volume", value=f"{int(self.player.volume*100)}%") + embed.add_field(name="Volume", value=f"{int(self.player.volume * 100)}%") embed.set_image(self.player.thumbnail_url) embed.set_footer(