@@ -200,8 +200,6 @@ def _check_dependencies():
200200else :
201201 sg_matplotlib_animations = True
202202
203- # The following import is only necessary to monkey patch the signature later on
204- from sphinx_gallery import gen_rst
205203
206204# Prevent plt.show() from emitting a non-GUI backend warning.
207205warnings .filterwarnings ('ignore' , category = UserWarning ,
@@ -299,7 +297,7 @@ def autodoc_process_bases(app, name, obj, options, bases):
299297 'reference_url' : {'matplotlib' : None , 'mpl_toolkits' : None },
300298 'prefer_full_module' : {r'mpl_toolkits\.' },
301299 'remove_config_comments' : True ,
302- 'reset_modules' : ('matplotlib' , clear_basic_units ),
300+ 'reset_modules' : ('matplotlib' , clear_basic_units , 'sphinxext.util.patch_header' ),
303301 'subsection_order' : gallery_order_sectionorder ,
304302 'thumbnail_size' : (320 , 224 ),
305303 'within_subsection_order' : gallery_order_subsectionorder ,
@@ -347,31 +345,6 @@ def gallery_image_warning_filter(record):
347345mathmpl_fontsize = 11.0
348346mathmpl_srcset = ['2x' ]
349347
350- # Monkey-patching gallery header to include search keywords
351- gen_rst .EXAMPLE_HEADER = """
352- .. DO NOT EDIT.
353- .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
354- .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
355- .. "{0}"
356- .. LINE NUMBERS ARE GIVEN BELOW.
357-
358- .. only:: html
359-
360- .. meta::
361- :keywords: codex
362-
363- .. note::
364- :class: sphx-glr-download-link-note
365-
366- :ref:`Go to the end <sphx_glr_download_{1}>`
367- to download the full example code{2}
368-
369- .. rst-class:: sphx-glr-example-title
370-
371- .. _sphx_glr_{1}:
372-
373- """
374-
375348# Add any paths that contain templates here, relative to this directory.
376349templates_path = ['_templates' ]
377350
0 commit comments