(module: types.ModuleType, obj_name: str)
return obj
Traverses the object name and returns the last (rightmost) python object.
Traverses the object name and returns the last (rightmost) python object.
Traverses the object name and returns the last ( rightmost ) python object .
def get_obj_from_module(module: types.ModuleType, obj_name: str) -> Any:
    """Traverses the object name and returns the last (rightmost) python object."""
    if obj_name == '':
        return module
    obj = module
    for part in obj_name.split("."):
        obj = getattr(obj, part)
    return obj
def get_obj_from_module ( module : types . ModuleType , obj_name : str ) -> Any : if obj_name == '' : return module obj = module for part in obj_name . split ( "." ) : obj = getattr ( obj , part ) return obj