Skip to content

Commit cc1d9b6

Browse files
authored
Merge pull request matplotlib#31044 from trygvrad/fix-for-sphinx_gallery-0.16.0
fix for sphinx_gallery < 0.16.0
2 parents 9957c39 + b208e7f commit cc1d9b6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

doc/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,16 @@ def _check_dependencies():
194194
gallery_order_sectionorder = 'sphinxext.gallery_order.sectionorder'
195195
gallery_order_subsectionorder = 'sphinxext.gallery_order.subsectionorder'
196196
clear_basic_units = 'sphinxext.util.clear_basic_units'
197+
patch_header = 'sphinxext.util.patch_header'
197198
matplotlib_reduced_latex_scraper = 'sphinxext.util.matplotlib_reduced_latex_scraper'
198199
else:
199200
# gallery_order.py from the sphinxext folder provides the classes that
200201
# allow custom ordering of sections and subsections of the gallery
201202
from sphinxext.gallery_order import (
202203
sectionorder as gallery_order_sectionorder,
203204
subsectionorder as gallery_order_subsectionorder)
204-
from sphinxext.util import clear_basic_units, matplotlib_reduced_latex_scraper
205+
from sphinxext.util import (clear_basic_units, matplotlib_reduced_latex_scraper,
206+
patch_header)
205207

206208
if parse_version(sphinx_gallery.__version__) >= parse_version('0.17.0'):
207209
sg_matplotlib_animations = (True, 'mp4')
@@ -305,7 +307,7 @@ def autodoc_process_bases(app, name, obj, options, bases):
305307
'reference_url': {'matplotlib': None, 'mpl_toolkits': None},
306308
'prefer_full_module': {r'mpl_toolkits\.'},
307309
'remove_config_comments': True,
308-
'reset_modules': ('matplotlib', clear_basic_units, 'sphinxext.util.patch_header'),
310+
'reset_modules': ('matplotlib', clear_basic_units, patch_header),
309311
'subsection_order': gallery_order_sectionorder,
310312
'thumbnail_size': (320, 224),
311313
'within_subsection_order': gallery_order_subsectionorder,

0 commit comments

Comments
 (0)