From 8a22d5ce23f55fe89971fe286d27bf6df64e8200 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 28 Feb 2024 11:08:16 -0500 Subject: [PATCH] fix(pterodactyl): pylint fixes --- pterodactyl/pterodactyl.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 476fe5a..722502d 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -41,10 +41,10 @@ class Pterodactyl(commands.Cog): websocket_credentials = client.servers.get_websocket(server_id) self.logger.debug("Websocket connection details retrieved:\nSocket: %s\nToken: %s", websocket_credentials['data']['socket'], websocket_credentials['data']['token']) except exceptions.ClientConfigError as e: - self.logger.error(f'Failed to initialize Pterodactyl client: {e}') + self.logger.error('Failed to initialize Pterodactyl client: %s', e) return except exceptions.PterodactylApiError as e: - self.logger.error(f'Failed to retrieve Pterodactyl websocket: {e}') + self.logger.error('Failed to retrieve Pterodactyl websocket: %s', e) return async with websockets.connect(websocket_credentials['data']['socket'], extra_headers=extra_headers) as websocket: @@ -76,18 +76,16 @@ class Pterodactyl(commands.Cog): self.task = self.get_task() async def cog_unload(self): - self.task.cancel() - await self.client._session.close() + self.task.cancel() + await self.client._session.close() # pylint: disable=protected-access @commands.group(autohelp = True, name = "pterodactyl", aliases = ["ptero"]) async def pterodactyl(self, ctx: commands.Context): """Pterodactyl allows you to manage your Pterodactyl Panel from Discord.""" - pass @pterodactyl.group(autohelp = True, name = "config", aliases = ["settings", "set"]) async def pterodactyl_config(self, ctx: commands.Context): """Configure Pterodactyl settings.""" - pass @pterodactyl_config.command(name = "url") async def pterodactyl_config_base_url(self, ctx: commands.Context, base_url: str):