Skip to content

Commit

Permalink
support running from ide
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmarkarl committed Oct 8, 2024
1 parent e796606 commit edefa86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jupyter_server/extension/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ def config_file_paths(self):
@classmethod
def get_extension_package(cls):
"""Get an extension package."""
parts = cls.__module__.split(".")
if cls.__module__ == "__main__":
# handle direct launch of ExtensionApp module, eg `python -m jupyterlab.labapp`
parts = cls.app_name.lower().split(".")
else:
parts = cls.__module__.split(".")

if is_namespace_package(parts[0]):
# in this case the package name is `<namespace>.<package>`.
return ".".join(parts[0:2])
Expand Down

0 comments on commit edefa86

Please sign in to comment.