Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5d2bcd8

Browse files
committed
Makefile html-noplot,clean: constrained layout tutorial image handling
1 parent d95edc4 commit 5d2bcd8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ clean:
2424
rm -rf "$(SOURCEDIR)/tutorials"
2525
rm -rf "$(SOURCEDIR)/savefig"
2626
rm -rf "$(SOURCEDIR)/sphinxext/__pycache__"
27+
rm -f $(SOURCEDIR)/_static/constrained_layout*.png
2728

2829
show:
2930
@python -c "import webbrowser; webbrowser.open_new_tab('file://$(shell pwd)/build/html/index.html')"

doc/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
208208

209209
def gallery_image_warning_filter(record):
210210
msg = record.msg
211-
for gallery_dir in sphinx_gallery_conf['gallery_dirs']:
212-
if msg.startswith(f'image file not readable: {gallery_dir}'):
211+
for pattern in (sphinx_gallery_conf['gallery_dirs'] +
212+
['_static/constrained_layout']):
213+
if msg.startswith(f'image file not readable: {pattern}'):
213214
return False
214215

215216
if msg == 'Could not obtain image size. :scale: option is ignored.':

0 commit comments

Comments
 (0)