Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f654a74

Browse filesBrowse files
asmeurerQuLogic
andauthored
Various small code cleanups from review
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent ce23c88 commit f654a74
Copy full SHA for f654a74

File tree

Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed

‎lib/matplotlib/sphinxext/plot_directive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/sphinxext/plot_directive.py
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -647,11 +647,9 @@ def check_output_base_name(env, output_base):
647647
if output_base in env.mpl_plot_image_basenames[d]:
648648
if d == docname:
649649
raise PlotError(
650-
f"The image-basename "
651-
f"{output_base}' is used multiple times.")
652-
raise PlotError(f"The image-basename "
653-
f"'{output_base}' is used multiple times "
654-
f"(it is also used in {env.doc2path(d)}).")
650+
f"The image-basename {output_base!r} is used multiple times.")
651+
raise PlotError(f"The image-basename {output_base!r} is used multiple"
652+
f"times (it is also used in {env.doc2path(d)}).")
655653

656654
env.mpl_plot_image_basenames[docname].add(output_base)
657655

@@ -778,8 +776,8 @@ def render_figures(code, code_path, output_dir, output_base, context,
778776

779777
def run(arguments, content, options, state_machine, state, lineno):
780778
document = state_machine.document
781-
config = document.settings.env.config
782779
env = document.settings.env
780+
config = env.config
783781
nofigs = 'nofigs' in options
784782

785783
if config.plot_srcset and setup.app.builder.name == 'singlehtml':

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.