def _discover_entry_points()

in src/aws_encryption_sdk_cli/internal/master_key_parsing.py [0:0]


def _discover_entry_points():
    # type: () -> None
    """Discover all registered entry points."""
    _LOGGER.debug("Discovering master key provider plugins")

    for entry_point in pkg_resources.iter_entry_points(MASTER_KEY_PROVIDERS_ENTRY_POINT):
        _LOGGER.info('Collecting plugin "%s" registered by "%s"', entry_point.name, entry_point.dist)
        _LOGGER.debug(
            "Plugin details: %s",
            dict(
                name=entry_point.name,
                module_name=entry_point.module_name,
                attrs=entry_point.attrs,
                extras=entry_point.extras,
                dist=entry_point.dist,
            ),
        )

        if PLUGIN_NAMESPACE_DIVIDER in entry_point.name:
            _LOGGER.warning(
                'Invalid substring "%s" in discovered entry point "%s". It will not be usable.',
                PLUGIN_NAMESPACE_DIVIDER,
                entry_point.name,
            )
            continue

        # mypy has trouble with pkgs_resources.iter_entry_points members
        _ENTRY_POINTS[entry_point.name][entry_point.dist.project_name] = entry_point  # type: ignore