yaml2instance/main.py
def call_multiple(
    loading_data: Union[dict, List[dict]], search_modules: List[ModuleType], **kwargs
) -> list:
    """From the list of modules, find the class written in yaml and instantiate it."""
    instance_list = []
    if isinstance(loading_data, list):
        for conf in loading_data:
            for instance in _call_instance_or_function(conf, search_modules, **kwargs):
                instance_list.append(instance)
    elif isinstance(loading_data, dict):
        for instance in _call_instance_or_function(
            loading_data, search_modules, **kwargs
        ):
            instance_list.append(instance)
    else:
        TypeError

    return instance_list
From the list of modules, find the class written in yaml and instantiate it.
From the list of modules, find the class written in yaml and instantiate it.
From the list of modules find the class written in yaml and instantiate it .
def call_multiple(
    loading_data: Union[dict, List[dict]], search_modules: List[ModuleType], **kwargs
) -> list:
    instance_list = []
    if isinstance(loading_data, list):
        for conf in loading_data:
            for instance in _call_instance_or_function(conf, search_modules, **kwargs):
                instance_list.append(instance)
    elif isinstance(loading_data, dict):
        for instance in _call_instance_or_function(
            loading_data, search_modules, **kwargs
        ):
            instance_list.append(instance)
    else:
        TypeError
    return instance_list
def call_multiple ( loading_data : Union [ dict , List [ dict ] ] , search_modules : List [ ModuleType ] , ** kwargs ) -> list : instance_list = [ ] if isinstance ( loading_data , list ) : for conf in loading_data : for instance in _call_instance_or_function ( conf , search_modules , ** kwargs ) : instance_list . append ( instance ) elif isinstance ( loading_data , dict ) : for instance in _call_instance_or_function ( loading_data , search_modules , ** kwargs ) : instance_list . append ( instance ) else : TypeError return instance_list
From the list of modules, find the class written in yaml and instantiate it.
From the list of modules find the class written in yaml and instantiate it .
"""From the list of modules, find the class written in yaml and instantiate it."""
loading_data
Union[dict, List[dict]]
search_modules
List[ModuleType]