Renamed loaders to more descriptive

This commit is contained in:
Petr Kalis 2025-04-08 10:49:04 +02:00
parent fb1879a645
commit 1e5f5446a7
2 changed files with 4 additions and 3 deletions

View file

@ -272,7 +272,7 @@ class PreLoadHookPlugin:
Any external studio might want to modify loaded data before or after
they are loaded without need to override existing core plugins.
"""
loaders: ClassVar[set[str]]
loader_identifiers: ClassVar[set[str]]
def process(self, context, name=None, namespace=None, options=None):
pass
@ -290,8 +290,9 @@ class PostLoadHookPlugin:
Should be used as non-invasive method to enrich core loading process.
Any external studio might want to modify loaded data before or after
they are loaded without need to override existing core plugins.
loaders: ClassVar[set[str]]
"""
loader_identifiers: ClassVar[set[str]]
def process(
self,
container,

View file

@ -1207,7 +1207,7 @@ def _get_hook_loaders(hook_loaders_by_identifier, loader_plugin, loader_type):
load_hook_plugins = discover(loader_plugin)
loaders_by_name = get_loaders_by_name()
for hook_plugin_cls in load_hook_plugins:
for load_plugin_name in hook_plugin_cls.loaders:
for load_plugin_name in hook_plugin_cls.loader_identifiers:
load_plugin = loaders_by_name.get(load_plugin_name)
if not load_plugin:
continue