diff --git a/docs/source/conf.py b/docs/source/conf.py index d94b651..88efab8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -108,10 +108,6 @@ # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - default_role = "obj" nitpicky = True diff --git a/mpl_gui/__init__.py b/mpl_gui/__init__.py index 999a216..353a272 100644 --- a/mpl_gui/__init__.py +++ b/mpl_gui/__init__.py @@ -235,7 +235,7 @@ def show_all(self, *, block=None, timeout=None): if timeout is None: timeout = self._timeout self._ensure_all_figures_promoted() - show(self.figures, block=self._block, timeout=self._timeout) + show(self.figures, block=self._block, timeout=timeout) # alias to easy pyplot compatibility show = show_all @@ -291,7 +291,8 @@ def close(self, val): """ if val == "all": - return self.close_all() + self.close_all() + return # or do we want to close _all_ of the figures with a given label / number? if isinstance(val, str): fig = self.by_label[val] @@ -311,6 +312,7 @@ def close(self, val): _FigureCanvasBase(figure=fig) assert fig.canvas.manager is None self._fig_to_number.pop(fig, None) + return class FigureContext(FigureRegistry): diff --git a/mpl_gui/_manage_backend.py b/mpl_gui/_manage_backend.py index 1929b08..6e51de2 100644 --- a/mpl_gui/_manage_backend.py +++ b/mpl_gui/_manage_backend.py @@ -79,10 +79,9 @@ def select_gui_toolkit(newbackend=None): except ImportError: continue - else: - # Switching to Agg should always succeed; if it doesn't, let the - # exception propagate out. - return select_gui_toolkit("agg") + # Switching to Agg should always succeed; if it doesn't, let the + # exception propagate out. + return select_gui_toolkit("agg") if isinstance(newbackend, str): # Backends are implemented as modules, but "inherit" default method