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 7d416cf

Browse filesBrowse files
committed
Simplify logic in merge_other
1 parent fc33c38 commit 7d416cf
Copy full SHA for 7d416cf

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
@@ -345,12 +345,10 @@ def clear_doc(self, app, env, docname):
345345
del env.mpl_plot_image_basenames[docname]
346346

347347
def merge_other(self, app, env, docnames, other):
348-
for docname in docnames:
349-
if docname in other.mpl_plot_image_basenames:
350-
if docname not in env.mpl_plot_image_basenames:
351-
env.mpl_plot_image_basenames[docname] = set()
352-
env.mpl_plot_image_basenames[docname].update(
353-
other.mpl_plot_image_basenames[docname])
348+
for docname in other.mpl_plot_image_basenames:
349+
env.mpl_plot_image_basenames[docname].update(
350+
other.mpl_plot_image_basenames[docname])
351+
354352

355353
# -----------------------------------------------------------------------------
356354
# Doctest handling

0 commit comments

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