def get_public_members():
    """Get public members in :mod:`bezier` package.

    Also validates the contents of ``bezier.__all__``.

    Returns:
        list: List of all public members **defined** in the
        main package (i.e. in ``__init__.py``).

    Raises:
        ValueError: If ``__all__`` has repeated elements.
        ValueError: If the "public" members in ``__init__.py`` don't match
            the members described in ``__all__``.
    """
    if bezier is None:
        return []

    local_members = []
    all_members = set()
    for name in dir(bezier):
        # Filter out non-public.
        if name.startswith("_") and name not in SPECIAL_MEMBERS:
            continue

        value = getattr(bezier, name)
        # Filter out imported modules.
        if isinstance(value, types.ModuleType):
            continue

        all_members.add(name)
        # Only keep values defined in the base package.
        home = getattr(value, "__module__", "bezier")
        if home == "bezier":
            local_members.append(name)
    size_all = len(bezier.__all__)
    all_exports = set(bezier.__all__)
    if len(all_exports) != size_all:
        raise ValueError("__all__ has repeated elements")

    if all_exports != all_members:
        raise ValueError(
            "__all__ does not agree with the publicly imported members",
            all_exports,
            all_members,
        )

    local_members = [
        member
        for member in local_members
        if member not in UNDOCUMENTED_SPECIAL_MEMBERS
    ]
    return local_members
def get_public_members ( ) : if bezier is None : return [ ] local_members = [ ] all_members = set ( ) for name in dir ( bezier ) : if name . startswith ( "_" ) and name not in SPECIAL_MEMBERS : continue value = getattr ( bezier , name ) if isinstance ( value , types . ModuleType ) : continue all_members . add ( name ) home = getattr ( value , "__module__" , "bezier" ) if home == "bezier" : local_members . append ( name ) size_all = len ( bezier . __all__ ) all_exports = set ( bezier . __all__ ) if len ( all_exports ) != size_all : raise ValueError ( "__all__ has repeated elements" ) if all_exports != all_members : raise ValueError ( "__all__ does not agree with the publicly imported members" , all_exports , all_members , ) local_members = [ member for member in local_members if member not in UNDOCUMENTED_SPECIAL_MEMBERS ] return local_members
Get public members in :mod:`bezier` package.

    Also validates the contents of ``bezier.__all__``.

    Returns:
        list: List of all public members **defined** in the
        main package (i.e. in ``__init__.py``).

    Raises:
        ValueError: If ``__all__`` has repeated elements.
        ValueError: If the "public" members in ``__init__.py`` don't match
            the members described in ``__all__``.