Skip to content

Commit

Permalink
relax type checking on ExtensionApp.serverapp
Browse files Browse the repository at this point in the history
Some extensions (e.g. JupyterLab) apparently may be loaded hooked up to a legacy NotebookApp, which is not a ServerApp.
  • Loading branch information
minrk committed Mar 16, 2022
1 parent a97edaa commit 0c708f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jupyter_server/extension/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from jupyter_core.application import NoStart
from tornado.log import LogFormatter
from tornado.web import RedirectHandler
from traitlets import Any
from traitlets import Bool
from traitlets import default
from traitlets import Dict
from traitlets import HasTraits
from traitlets import Instance
from traitlets import List
from traitlets import Unicode
from traitlets.config import Config
Expand Down Expand Up @@ -207,7 +207,7 @@ def _default_url(self):
]

# A ServerApp is not defined yet, but will be initialized below.
serverapp = Instance(ServerApp)
serverapp = Any()

@default("serverapp")
def _default_serverapp(self):
Expand Down

0 comments on commit 0c708f2

Please sign in to comment.