(node)
return all_
Get the contents of the ``__all__`` variable from a module.

    :param node: The module to get ``__all__`` from.
    :type node: astroid.nodes.Module

    :returns: The contents of ``__all__`` if defined. Otherwise None.
    :rtype: list(str) or None
Get the contents of the ``__all__`` variable from a module.
Get the contents of the __all__ variable from a module .
def get_module_all(node):
    """Get the contents of the ``__all__`` variable from a module.

    :param node: The module to get ``__all__`` from.
    :type node: astroid.nodes.Module

    :returns: The contents of ``__all__`` if defined. Otherwise None.
    :rtype: list(str) or None
    """
    all_ = None

    if "__all__" in node.locals:
        assigned = next(node.igetattr("__all__"))
        if assigned is not astroid.Uninferable:
            all_ = []
            for elt in getattr(assigned, "elts", ()):
                try:
                    elt_name = next(elt.infer())
                except astroid.InferenceError:
                    continue

                if elt_name is astroid.Uninferable:
                    continue

                if isinstance(elt_name, astroid.Const) and isinstance(
                    elt_name.value, str
                ):
                    all_.append(elt_name.value)

    return all_
def get_module_all ( node ) : all_ = None if "__all__" in node . locals : assigned = next ( node . igetattr ( "__all__" ) ) if assigned is not astroid . Uninferable : all_ = [ ] for elt in getattr ( assigned , "elts" , ( ) ) : try : elt_name = next ( elt . infer ( ) ) except astroid . InferenceError : continue if elt_name is astroid . Uninferable : continue if isinstance ( elt_name , astroid . Const ) and isinstance ( elt_name . value , str ) : all_ . append ( elt_name . value ) return all_