def get_descriptors_from_module(mdl, submodule=False):
    r"""[DEPRECATED] Get descriptors from module.

    Parameters:
        mdl(module): module to search

    Returns:
        [Descriptor]

    """
    warnings.warn("use get_descriptors_in_module", DeprecationWarning)
    __all__ = getattr(mdl, "__all__", None)
    if __all__ is None:
        __all__ = dir(mdl)

    all_functions = (getattr(mdl, name) for name in __all__ if name[:1] != "_")

    if submodule:
        descs = [
            d
            for fn in all_functions
            if is_descriptor_class(fn) or isinstance(fn, ModuleType)
            for d in (
                [fn] if is_descriptor_class(fn)
                else get_descriptors_from_module(fn, submodule=True)
            )
        ]
    else:
        descs = [
            fn
            for fn in all_functions
            if is_descriptor_class(fn)
        ]

    return descs
def get_descriptors_from_module(mdl, submodule=False):
    r"""[DEPRECATED] Get descriptors from module.

    Parameters:
        mdl(module): module to search

    Returns:
        [Descriptor]

    """
    warnings.warn("use get_descriptors_in_module", DeprecationWarning)
    __all__ = getattr(mdl, "__all__", None)
    if __all__ is None:
        __all__ = dir(mdl)

    all_functions = (getattr(mdl, name) for name in __all__ if name[:1] != "_")

    if submodule:
        descs = [
            d
            for fn in all_functions
            if is_descriptor_class(fn) or isinstance(fn, ModuleType)
            for d in (
                [fn] if is_descriptor_class(fn)
                else get_descriptors_from_module(fn, submodule=True)
            )
        ]
    else:
        descs = [
            fn
            for fn in all_functions
            if is_descriptor_class(fn)
        ]

    return descs
def get_descriptors_from_module ( mdl , submodule = False ) : warnings . warn ( "use get_descriptors_in_module" , DeprecationWarning ) __all__ = getattr ( mdl , "__all__" , None ) if __all__ is None : __all__ = dir ( mdl ) all_functions = ( getattr ( mdl , name ) for name in __all__ if name [ : 1 ] != "_" ) if submodule : descs = [ d for fn in all_functions if is_descriptor_class ( fn ) or isinstance ( fn , ModuleType ) for d in ( [ fn ] if is_descriptor_class ( fn ) else get_descriptors_from_module ( fn , submodule = True ) ) ] else : descs = [ fn for fn in all_functions if is_descriptor_class ( fn ) ] return descs
r"""[DEPRECATED] Get descriptors from module.

    Parameters:
        mdl(module): module to search

    Returns:
        [Descriptor]
r [ DEPRECATED ] Get descriptors from module .