We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e04f4f9 commit f893f55Copy full SHA for f893f55
dash/_pages.py
@@ -86,12 +86,10 @@ def _infer_path(module_name, template):
86
87
88
def _module_name_is_package(module_name):
89
- file_path = sys.modules[module_name].__file__
90
- return (
91
- file_path
92
- and module_name in sys.modules
93
- and Path(file_path).name == "__init__.py"
94
- )
+ if module_name not in sys.modules:
+ return False
+ file = sys.modules[module_name].__file__
+ return file and file.endswith("__init__.py")
95
96
97
def _path_to_module_name(path):
0 commit comments