8000 MNT: Set the module backend param at the end · matplotlib/matplotlib@f142835 · GitHub
[go: up one dir, main page]

Skip to content

Commit f142835

Browse files
committed
MNT: Set the module backend param at the end
1 parent f118405 commit f142835

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/backends/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ def pylab_setup(name=None):
4242
if name is None:
4343
# validates, to match all_backends
4444
name = matplotlib.get_backend()
45-
# need to keep a global reference to the backend for compatibility
46-
# reasons. See https://github.com/matplotlib/matplotlib/issues/6092
47-
global backend
48-
backend = name
4945
if name.startswith('module://'):
5046
backend_name = name[9:]
5147
else:
@@ -85,4 +81,8 @@ def do_nothing(*args, **kwargs):
8581
matplotlib.verbose.report('backend %s version %s' %
8682
(name, backend_version))
8783

84+
# need to keep a global reference to the backend for compatibility
85+
# reasons. See https://github.com/matplotlib/matplotlib/issues/6092
86+
global backend
87+
backend = name
8888
return backend_mod, new_figure_manager, draw_if_interactive, show

0 commit comments

Comments
 (0)
0