from jinja2 import Environment, FileSystemLoader from traitlets import (Unicode, List, Dict, Bool, default, validate) from traitlets.config import Config from jupyter_core.application import JupyterApp from jupyter_server.serverapp import ServerApp, aliases, flags from jupyter_server.transutils import _ from jupyter_server.utils import url_path_join from .handler import ExtensionHandlerMixin # Remove alias for nested classes in ServerApp. # Nested classes are not allowed in ExtensionApp. try: aliases.pop('transport') except KeyError: pass #----------------------------------------------------------------------------- # Util functions and classes. #----------------------------------------------------------------------------- def _preparse_for_subcommand(Application, argv): """Preparse command line to look for subcommands. """ # Read in arguments from command line. if len(argv) == 0: return
from jinja2 import Environment, FileSystemLoader from traitlets import Unicode, List, Dict, Bool, default, validate from traitlets.config import Config from jupyter_core.application import JupyterApp from jupyter_server.serverapp import ServerApp, aliases, flags from jupyter_server.transutils import _ from jupyter_server.utils import url_path_join from .handler import ExtensionHandler # Remove alias for nested classes in ServerApp. # Nested classes are not allowed in ExtensionApp. try: aliases.pop("transport") except KeyError: pass # ----------------------------------------------------------------------------- # Util functions and classes. # ----------------------------------------------------------------------------- def _preparse_for_subcommand(Application, argv): """Preparse command line to look for subcommands. """ # Read in arguments from command line. if len(argv) == 0: return