From c04202d0e77923b90ab6f5eb9cc82ede915744e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Fri, 8 Jan 2021 18:04:16 -0600 Subject: [PATCH] Rename _normalize_input -> _normalize_tags --- pytools/tag.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytools/tag.py b/pytools/tag.py index 0a8c172..088114d 100644 --- a/pytools/tag.py +++ b/pytools/tag.py @@ -191,7 +191,7 @@ class Taggable: self.tags = tags self._check_uniqueness() - def _normalize_input(self, tags: TagOrIterableType) -> TagsType: + def _normalize_tags(self, tags: TagOrIterableType) -> TagsType: if isinstance(tags, Tag): t = frozenset([tags]) elif tags is None: @@ -230,7 +230,7 @@ class Taggable: :arg tags: An instance of :class:`Tag` or an iterable with instances therein. """ - new_tags = self._normalize_input(tags) + new_tags = self._normalize_tags(tags) union_tags = self.tags | new_tags cpy = self.copy(tags=union_tags) return cpy @@ -248,7 +248,7 @@ class Taggable: for removal are present in the original set of tags. Default `True` """ - to_remove = self._normalize_input(tags) + to_remove = self._normalize_tags(tags) new_tags = self.tags - to_remove if verify_existence and len(new_tags) > len(self.tags) - len(to_remove): raise ValueError("A tag specified for removal was not present.") -- GitLab