From 445a58e5732e4d9d241f546a91cd8d389bfd32e3 Mon Sep 17 00:00:00 2001 From: Eviee Py Date: Tue, 25 Jun 2024 06:26:07 +1000 Subject: [PATCH] Remove unnecessary else statement --- wavelink/player.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wavelink/player.py b/wavelink/player.py index 8cb9a020..3f0d1fd2 100644 --- a/wavelink/player.py +++ b/wavelink/player.py @@ -169,15 +169,13 @@ def __init__( self._inactivity_wait: int | None = self._node._inactive_player_timeout def _inactivity_task_callback(self, task: asyncio.Task[bool]) -> None: - cancelled: bool + cancelled: bool = False try: result: bool = task.result() except asyncio.CancelledError: cancelled = True result = False - else: - cancelled = task.cancelled() if cancelled or result is False: logger.debug("Disregarding Inactivity Check Task <%s> as it was previously cancelled.", task.get_name())