Skip to content

Commit b386cf2

Browse files
author
Lachlan Teale
committed
Fixes #131 and #162
1 parent 2799847 commit b386cf2

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

dash_daq/__init__.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,8 @@
99
with open(_filepath) as f:
1010
__version__ = json.loads(f.read())['version']
1111

12-
_current_path = _os.path.dirname(_os.path.abspath(__file__))
13-
14-
_components = _dash.development.component_loader.load_components(
15-
_os.path.join(_current_path, 'metadata.json'),
16-
'dash_daq'
17-
)
18-
19-
_this_module = _sys.modules[__name__]
12+
from ._imports_ import * # noqa: F401, F403, E402
13+
from ._imports_ import __all__ # noqa: E402
2014

2115
async_resources = [
2216
'colorpicker',
@@ -70,7 +64,5 @@
7064
_css_dist = []
7165

7266

73-
for _component in _components:
74-
setattr(_this_module, _component.__name__, _component)
75-
setattr(_component, '_js_dist', _js_dist)
76-
setattr(_component, '_css_dist', _css_dist)
67+
for _component in __all__:
68+
setattr(locals()[_component], '_js_dist', _js_dist)

0 commit comments

Comments
 (0)