Skip to content

Commit b6fe9e5

Browse files
committed
Conform to flake8
1 parent 453d17d commit b6fe9e5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

lib/matplotlib/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,13 @@ def wrapper():
282282

283283
_ExecInfo = namedtuple("_ExecInfo", "executable version")
284284

285+
285286
class ExecutableUnavailableError(FileNotFoundError):
286-
"""Error raised when an executable that Matplotlib optionally depends on can't be found."""
287+
"""Error raised when an executable that Matplotlib optionally
288+
depends on can't be found."""
287289
pass
288290

291+
289292
@functools.lru_cache()
290293
def _get_executable_info(name):
291294
"""
@@ -357,7 +360,8 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
357360
return impl([e, "--version"], "(.*)", "9")
358361
except ExecutableUnavailableError:
359362
pass
360-
raise ExecutableUnavailableError("Failed to find a Ghostscript installation")
363+
message = "Failed to find a Ghostscript installation"
364+
raise ExecutableUnavailableError(message)
361365
elif name == "inkscape":
362366
return impl(["inkscape", "-V"], "^Inkscape ([^ ]*)")
363367
elif name == "magick":

lib/matplotlib/animation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,8 @@ def bin_path(cls):
725725
def isAvailable(cls):
726726
try:
727727
return super().isAvailable()
728-
except mpl.ExecutableUnavailableError: # May be raised by get_executable_info.
728+
except mpl.ExecutableUnavailableError:
729+
# May be raised by get_executable_info.
729730
return False
730731

731732

0 commit comments

Comments
 (0)