From 2871992772347f2b95aec214cab113953010f461 Mon Sep 17 00:00:00 2001 From: Kyla Date: Sun, 17 Nov 2024 19:54:30 +0330 Subject: [PATCH 1/2] Define view once inside `menus.menu` for button menus (#6472) --- redbot/core/utils/menus.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/redbot/core/utils/menus.py b/redbot/core/utils/menus.py index b5ee86a01cf..7176188d7cd 100644 --- a/redbot/core/utils/menus.py +++ b/redbot/core/utils/menus.py @@ -212,13 +212,12 @@ async def control_no(*args, **kwargs): # where the original message is already sent prior to starting. # This is not normally the way we recommend sending this because # internally we already include the emojis we expect. + view = SimpleMenu(pages, timeout=timeout) if controls == DEFAULT_CONTROLS: - view = SimpleMenu(pages, timeout=timeout) await view.start(ctx, user=user) await view.wait() return else: - view = SimpleMenu(pages, timeout=timeout) view.remove_item(view.last_button) view.remove_item(view.first_button) has_next = False From 33e0eac741955ce5b7e89d9b8f2f2712727af770 Mon Sep 17 00:00:00 2001 From: palmtree5 <3577255+palmtree5@users.noreply.github.com> Date: Sun, 17 Nov 2024 08:01:31 -0900 Subject: [PATCH 2/2] Remove deprecated options from `.pylintrc` (#6462) Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com> --- .pylintrc | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.pylintrc b/.pylintrc index 1e870ede169..84b81da7930 100644 --- a/.pylintrc +++ b/.pylintrc @@ -26,14 +26,6 @@ unsafe-load-any-extension=no # run arbitrary code extension-pkg-whitelist= -# Allow optimization of some AST trees. This will activate a peephole AST -# optimizer, which will apply various small optimizations. For instance, it can -# be used to obtain the result of joining multiple strings with the addition -# operator. Joining a lot of strings can lead to a maximum recursion error in -# Pylint and this flag can prevent that. It has one side effect, the resulting -# AST will be different than the one from reality. -optimize-ast=no - [MESSAGES CONTROL] @@ -66,7 +58,6 @@ disable=C, # black is enforcing this for us already, incompatibly [REPORTS] output-format=parseable -files-output=no reports=no