Skip to content

Commit 09e9a9d

Browse files
committed
MNT: don't use else close on for-loop as we return inside
1 parent a473e8f commit 09e9a9d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mpl_gui/_manage_backend.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@ def select_gui_toolkit(newbackend=None):
7979
except ImportError:
8080
continue
8181

82-
else:
83-
# Switching to Agg should always succeed; if it doesn't, let the
84-
# exception propagate out.
85-
return select_gui_toolkit("agg")
82+
# Switching to Agg should always succeed; if it doesn't, let the
83+
# exception propagate out.
84+
return select_gui_toolkit("agg")
8685

8786
if isinstance(newbackend, str):
8887
# Backends are implemented as modules, but "inherit" default method

0 commit comments

Comments
 (0)