From 926f2903dc9bb30bf1cc6eb79a696bed4f68827b Mon Sep 17 00:00:00 2001 From: Ruth Comer <10599679+rcomer@users.noreply.github.com> Date: Thu, 30 Mar 2023 15:10:48 +0100 Subject: [PATCH] Backport PR #25580: Fix return type of get_plot_commands --- lib/matplotlib/pyplot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index 9a4cb27e30dc..56e24ccbc578 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -2105,8 +2105,8 @@ def get_plot_commands(): NON_PLOT_COMMANDS = { 'connect', 'disconnect', 'get_current_fig_manager', 'ginput', 'new_figure_manager', 'waitforbuttonpress'} - return (name for name in _get_pyplot_commands() - if name not in NON_PLOT_COMMANDS) + return [name for name in _get_pyplot_commands() + if name not in NON_PLOT_COMMANDS] def _get_pyplot_commands():