Skip to content

Commit a2ab033

Browse files
committed
Rename ComponentRegistry.component_registry -> registry.
1 parent 7ed1fd2 commit a2ab033

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dash/development/base_component.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class ComponentRegistry(abc.ABCMeta):
1212
"""Just importing a component lib will make it be loaded on the index"""
1313

14-
component_registry = set()
14+
registry = set()
1515
__dist_cache = collections.defaultdict(dict)
1616

1717
# pylint: disable=arguments-differ
@@ -24,22 +24,22 @@ def __new__(mcs, name, bases, attributes):
2424
# as it doesn't have the namespace.
2525
return component
2626

27-
mcs.component_registry.add(module)
27+
mcs.registry.add(module)
2828

2929
return component
3030

3131
@classmethod
3232
def get_resources(mcs, resource_name):
3333
cached = mcs.__dist_cache.get(resource_name)
34-
current_len = len(mcs.component_registry)
34+
current_len = len(mcs.registry)
3535

3636
if cached and current_len == cached.get('len'):
3737
return cached.get('resources')
3838

3939
mcs.__dist_cache[resource_name]['resources'] = resources = []
4040
mcs.__dist_cache[resource_name]['len'] = current_len
4141

42-
for module_name in mcs.component_registry:
42+
for module_name in mcs.registry:
4343
module = sys.modules[module_name]
4444
resources.extend(getattr(module, resource_name, []))
4545

dash/development/component_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def load_components(metadata_path,
3232
"""
3333

3434
# Register the component lib for index include.
35-
ComponentRegistry.component_registry.add(namespace)
35+
ComponentRegistry.registry.add(namespace)
3636
components = []
3737

3838
data = _get_metadata(metadata_path)

0 commit comments

Comments
 (0)