Skip to content

Commit a1d6cfd

Browse files
pre-commit-ci[bot]jtpio
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 36dab93 commit a1d6cfd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/source/api/handlers.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ Example (in a server extension ``load_jupyter_server_extension`` or ``_load_jupy
3030
.. code-block:: python
3131
3232
def my_page_config_hook(handler, page_config: dict) -> dict:
33-
page_config.setdefault('extraKeys', {})
34-
page_config['extraKeys']['hello'] = 'world'
35-
return page_config
33+
page_config.setdefault("extraKeys", {})
34+
page_config["extraKeys"]["hello"] = "world"
35+
return page_config
36+
3637
3738
def load_jupyter_server_extension(serverapp):
38-
web_app = serverapp.web_app
39-
web_app.settings['page_config_hook'] = my_page_config_hook
39+
web_app = serverapp.web_app
40+
web_app.settings["page_config_hook"] = my_page_config_hook
4041
4142
With this hook set, JupyterLab Server will call it during page configuration assembly, letting you inject or tweak values prior to rendering the index page.
4243

0 commit comments

Comments
 (0)