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

Skip to content

Commit faf88bf

Browse files
authored
Merge pull request #24445 from rcomer/noplot-warning
Makefile html-noplot,clean: constrained layout tutorial image handling
2 parents 5ec2bd2 + 5d2bcd8 commit faf88bf

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
@@ -252,8 +252,9 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
252252

253253
def gallery_image_warning_filter(record):
254254
msg = record.msg
255-
for gallery_dir in sphinx_gallery_conf['gallery_dirs']:
256-
if msg.startswith(f'image file not readable: {gallery_dir}'):
255+
for pattern in (sphinx_gallery_conf['gallery_dirs'] +
256+
['_static/constrained_layout']):
257+
if msg.startswith(f'image file not readable: {pattern}'):
257258
return False
258259

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

0 commit comments

Comments
 (0)