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

Skip to content

Commit 3a5e0b7

Browse files
story645ksunden
andcommitted
filter warnings triggered by #26472 when building docs
Co-authored-by: Kyle Sunden <[email protected]>
1 parent 4381c4b commit 3a5e0b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ def _check_dependencies():
160160
# The following import is only necessary to monkey patch the signature later on
161161
from sphinx_gallery import gen_rst
162162

163-
# On Linux, prevent plt.show() from emitting a non-GUI backend warning.
164-
os.environ.pop("DISPLAY", None)
163+
# Prevent plt.show() from emitting a non-GUI backend warning.
164+
warnings.filterwarnings('ignore', category=UserWarning,
165+
message=r'(\n|.)*is non-interactive, and thus cannot be shown')
165166

166167
autosummary_generate = True
167168
autodoc_typehints = "none"

0 commit comments

Comments
 (0)