diff --git a/changelogs/fragments/1-cleanup.yml b/changelogs/fragments/1-cleanup.yml index a6ac401..73e989f 100644 --- a/changelogs/fragments/1-cleanup.yml +++ b/changelogs/fragments/1-cleanup.yml @@ -1,2 +1,4 @@ minor_changes: - "Remove unused code (https://github.com/ansible-community/antsibull-core/pull/1)." +removed_features: + - "Remove package ``antsibull_core.utils.transformations`` (https://github.com/ansible-community/antsibull-core/pull/1)." diff --git a/src/antsibull_core/utils/transformations.py b/src/antsibull_core/utils/transformations.py deleted file mode 100644 index 6385e20..0000000 --- a/src/antsibull_core/utils/transformations.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 -# Author: Felix Fontein -# Author: Toshio Kuratomi -# License: GPLv3+ -# Copyright: Ansible Project, 2021 -"""General transformation functions.""" - -import typing as t -from collections import defaultdict - - -def get_collection_namespaces(collection_names: t.Iterable[str]) -> t.Dict[str, t.List[str]]: - """ - Return the plugins which are in each collection. - - :arg collection_names: An iterable of collection names. - :returns: Mapping from collection namespaces to list of collection names. - """ - namespaces = defaultdict(list) - for collection_name in collection_names: - namespace, name = collection_name.split('.', 1) - namespaces[namespace].append(name) - return namespaces