Skip to content

Commit

Permalink
extensions: allow extensions in namespace packages
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed May 20, 2021
1 parent 5f76fda commit b3f101a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jupyter_server/extension/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ def _default_open_browser(self):

@classmethod
def get_extension_package(cls):
return cls.__module__.split('.')[0]
parts = cls.__module__.split('.')
if '(namespace)' not in str(__import__(parts[0])):
return parts[0]
return '.'.join(parts[0:2])

@classmethod
def get_extension_point(cls):
Expand Down

0 comments on commit b3f101a

Please sign in to comment.