From 65472496e2227b30dfe22ad39b7a256bd083d2eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enes=20Kurbeto=C4=9Flu?= Date: Thu, 11 Jan 2024 16:44:21 +0300 Subject: [PATCH] format --- app/Bot.py | 14 ++++++-------- app/classes/Grand_Blue.py | 1 - app/classes/Guya_moe.py | 1 - app/classes/MangaDex.py | 1 - app/classes/OsuAPI.py | 1 - app/classes/Re_zero.py | 1 - app/classes/Views/FilterView.py | 1 - app/classes/Views/Pagination.py | 1 - app/classes/Views/Pick.py | 1 - app/cogs/DB.py | 1 - app/cogs/Gif.py | 1 - app/cogs/Util.py | 1 - 12 files changed, 6 insertions(+), 19 deletions(-) diff --git a/app/Bot.py b/app/Bot.py index 9c4df85..631c9b4 100644 --- a/app/Bot.py +++ b/app/Bot.py @@ -122,7 +122,7 @@ async def send_stats(self, client): async def setup_hook(self) -> None: self.session = aiohttp.ClientSession() - + self.add_view(PersistentViewHelp("0", self)) await self.load_cogs() @@ -139,7 +139,7 @@ async def close(self): for view in self.persistent_views: await view.on_timeout() await super().close() - + class PersistentViewHelp(View): def __init__(self, mode: str, bot: Bot): @@ -286,15 +286,13 @@ async def send_info(self, interaction: discord.Interaction): for a in l: if isinstance(a, (list, tuple, set)): try: - if isinstance(a[-1], (discord.User, discord.Member)): # type: ignore - temp.append(a[-1].name) # type: ignore + if isinstance(a[-1], (discord.User, discord.Member)): # type: ignore + temp.append(a[-1].name) # type: ignore else: - temp.append(a[-1]) # type: ignore + temp.append(a[-1]) # type: ignore except IndexError: pass - self.app_command_invokes_namespaces.append( - (interaction.command.name, temp) - ) + self.app_command_invokes_namespaces.append((interaction.command.name, temp)) if self.app_commands_invoked % 10 == 0: user = interaction.client.get_user(442715989310832650) await user.send( diff --git a/app/classes/Grand_Blue.py b/app/classes/Grand_Blue.py index 45c66ca..b243fa3 100644 --- a/app/classes/Grand_Blue.py +++ b/app/classes/Grand_Blue.py @@ -9,7 +9,6 @@ class Grand_Blue(Scrape_Series): - __slots__ = ("url", "bot") def __init__(self, url: str, bot: Bot): diff --git a/app/classes/Guya_moe.py b/app/classes/Guya_moe.py index 6e2dbc0..ec03e61 100644 --- a/app/classes/Guya_moe.py +++ b/app/classes/Guya_moe.py @@ -9,7 +9,6 @@ class Guya_moe(Scrape_Series): - __slots__ = ("url", "bot") def __init__(self, url: str, bot: Bot): diff --git a/app/classes/MangaDex.py b/app/classes/MangaDex.py index ca007ad..dc5c828 100644 --- a/app/classes/MangaDex.py +++ b/app/classes/MangaDex.py @@ -8,7 +8,6 @@ class Chapter: - __slots__ = ( "id", "title", diff --git a/app/classes/OsuAPI.py b/app/classes/OsuAPI.py index e72f1df..80853e3 100644 --- a/app/classes/OsuAPI.py +++ b/app/classes/OsuAPI.py @@ -12,7 +12,6 @@ class OsuAPI: - __slots__ = ( "bot", "base_url", diff --git a/app/classes/Re_zero.py b/app/classes/Re_zero.py index c092c91..d651f5b 100644 --- a/app/classes/Re_zero.py +++ b/app/classes/Re_zero.py @@ -9,7 +9,6 @@ class Re_zero(Scrape_Series): - __slots__ = ("url", "bot") def __init__(self, url: str, bot: Bot): diff --git a/app/classes/Views/FilterView.py b/app/classes/Views/FilterView.py index 8e074e3..3363856 100644 --- a/app/classes/Views/FilterView.py +++ b/app/classes/Views/FilterView.py @@ -98,7 +98,6 @@ async def inner(self: "FilterView", choice: int) -> None: class FilterView(ui.View): - __slots__ = ( "i", "embed", diff --git a/app/classes/Views/Pagination.py b/app/classes/Views/Pagination.py index f82bd4c..71e2bce 100644 --- a/app/classes/Views/Pagination.py +++ b/app/classes/Views/Pagination.py @@ -20,7 +20,6 @@ async def format_page(self, menu, entries): # type: ignore class MangaReader(ui.View, menus.MenuPages): - __slots__ = ( "_source", "current_page", diff --git a/app/classes/Views/Pick.py b/app/classes/Views/Pick.py index 39ed8db..c44e9bb 100644 --- a/app/classes/Views/Pick.py +++ b/app/classes/Views/Pick.py @@ -10,7 +10,6 @@ class PickView(ui.View): - __slots__ = ( "i", "mangas", diff --git a/app/cogs/DB.py b/app/cogs/DB.py index 34ec916..941b5b3 100644 --- a/app/cogs/DB.py +++ b/app/cogs/DB.py @@ -22,7 +22,6 @@ class DB(commands.Cog): - _IMGUR: ClassVar[Optional[str]] = os.getenv("IMGUR_ID", None) def __init__(self, bot: Bot): diff --git a/app/cogs/Gif.py b/app/cogs/Gif.py index 15012c6..afc50f1 100644 --- a/app/cogs/Gif.py +++ b/app/cogs/Gif.py @@ -16,7 +16,6 @@ class Gif(commands.Cog): - _tenor_api_key: ClassVar[Optional[str]] = os.getenv("TENOR_API_KEY", None) def __init__(self, bot: Bot): diff --git a/app/cogs/Util.py b/app/cogs/Util.py index ff3e4f4..1e20848 100644 --- a/app/cogs/Util.py +++ b/app/cogs/Util.py @@ -19,7 +19,6 @@ class Util(commands.Cog): - _saucenao_api_key: ClassVar[Optional[str]] = os.getenv("SAUCENAO_API_KEY", None) _token: ClassVar[Optional[str]] = os.getenv("TOKEN_DEBUG", None)