Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mnt: fix a couple of things from codeql #15

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions mpl_gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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):
Expand Down
7 changes: 3 additions & 4 deletions mpl_gui/_manage_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading