Skip to content

Commit 23cd661

Browse files
Add type annotation to server extension docs
It was helpful for me to know the type of the `serverapp` arg passed to the `_load_jupyter_server_extension` function, so I added it here as a type annotation.
1 parent 7a7789c commit 23cd661

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/developers/extensions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The simplest way to write a Jupyter Server extension is to write an extension mo
1212

1313
.. code-block:: python
1414
15-
def _load_jupyter_server_extension(serverapp):
15+
def _load_jupyter_server_extension(serverapp: jupyter_server.serverapp.ServerApp):
1616
"""
1717
This function is called when the extension is loaded.
1818
"""
@@ -46,7 +46,7 @@ Then add this handler to Jupyter Server's Web Application through the ``_load_ju
4646

4747
.. code-block:: python
4848
49-
def _load_jupyter_server_extension(serverapp):
49+
def _load_jupyter_server_extension(serverapp: jupyter_server.serverapp.ServerApp):
5050
"""
5151
This function is called when the extension is loaded.
5252
"""

0 commit comments

Comments
 (0)