Skip to content

Commit 7e083b5

Browse files
committed
Add a no-op for backwards compatibility
1 parent 166c61d commit 7e083b5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

jupyter_server/extension/manager.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,20 @@ def _get_loader(self):
120120
return loader
121121

122122
def _get_starter(self):
123-
"""Get a linker."""
123+
"""Get a starter function."""
124124
if self.app:
125125
linker = self.app._start_jupyter_server_extension
126126
else:
127+
128+
async def _noop_start(serverapp):
129+
return
130+
127131
linker = getattr(
128132
self.module,
129133
# Search for a _start_jupyter_extension
130134
"_start_jupyter_server_extension",
131-
# Otherwise return a dummy function.
132-
lambda serverapp: None,
135+
# Otherwise return a no-op function.
136+
_noop_start,
133137
)
134138
return linker
135139

0 commit comments

Comments
 (0)