8000 Fix flake8 errors · matplotlib/matplotlib@506aef0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 506aef0

Browse files
committed
Fix flake8 errors
1 parent 4df7c14 commit 506aef0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,10 @@ def render_figures(code, code_path, output_dir, output_base, context,
717717
for fmt, dpi in formats:
718718
try:
719719
if os.path.exists(img.filename(fmt)):
720-
raise PlotError('file %s already exists. You may need to set output-base-name to something else.' % img.filename(fmt))
720+
raise PlotError(
721+
'file %s already exists. You may need to '
722+
'set output-base-name to something else.'
723+
% img.filename(fmt))
721724
figman.canvas.figure.savefig(img.filename(fmt), dpi=dpi)
722725
if fmt == formats[0][0] and config.plot_srcset:
723726
# save a 2x, 3x etc version of the default...
@@ -726,7 +729,10 @@ def render_figures(code, code_path, output_dir, output_base, context,
726729
fm = f'{suffix}.{fmt}'
727730
img.formats.append(fm)
728731
if os.path.exists(img.filename(fm)):
729-
raise PlotError('file %s already exists. You may need to set output-base-name to something else.' % img.filename(fmt))
732+
raise PlotError(
733+
'file %s already exists. You may need to '
734+
'set output-base-name to something else.'
735+
% img.filename(fmt))
730736
figman.canvas.figure.savefig(img.filename(fm),
731737
dpi=int(dpi * mult))
732738
except Exception as err:

0 commit comments

Comments
 (0)
0