From df7d453ea29b29071f371a9bd54f20ef00386d32 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 26 Oct 2023 11:45:15 +0100 Subject: [PATCH] Explicitly set navigation_with_keys to False for HTML theme to avoid warning --- docs/conf.py | 2 ++ glue_jupyter/conftest.py | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6cd54ecc..6fc3c2dd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -63,3 +63,5 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = "sphinx_book_theme" +html_theme_options = {'navigation_with_keys': False} + diff --git a/glue_jupyter/conftest.py b/glue_jupyter/conftest.py index 29b161f7..bf881d25 100644 --- a/glue_jupyter/conftest.py +++ b/glue_jupyter/conftest.py @@ -68,20 +68,20 @@ def app(dataxyz, datax, dataxz, data_volume, data_image): return app -# ORIGINAL_DISPLAY = None +ORIGINAL_DISPLAY = None -# def noop(*args, **kwargs): -# pass +def noop(*args, **kwargs): + pass -# def pytest_configure(config): -# global ORIGINAL_DISPLAY -# import IPython.display as idisp -# ORIGINAL_DISPLAY = idisp.display -# idisp.display = noop +def pytest_configure(config): + global ORIGINAL_DISPLAY + import IPython.display as idisp + ORIGINAL_DISPLAY = idisp.display + idisp.display = noop -# def pytest_unconfigure(config): -# import IPython.display as idisp -# idisp.display = ORIGINAL_DISPLAY +def pytest_unconfigure(config): + import IPython.display as idisp + idisp.display = ORIGINAL_DISPLAY