diff --git a/hikari/impl/stateful_cache.py b/hikari/impl/stateful_cache.py index b62b65fbb6..fcd6ad528a 100644 --- a/hikari/impl/stateful_cache.py +++ b/hikari/impl/stateful_cache.py @@ -30,7 +30,6 @@ import logging import typing -import hikari.utilities.collections from hikari import channels from hikari import emojis from hikari import errors @@ -369,7 +368,7 @@ def set_emoji(self, emoji: emojis.KnownCustomEmoji, /) -> None: guild_container = self._get_or_create_guild_record(emoji.guild_id) if guild_container.emojis is None: # TODO: add test cases when it is not None? - guild_container.emojis = hikari.utilities.collections.SnowflakeSet() + guild_container.emojis = collections.SnowflakeSet() guild_container.emojis.add(emoji.id) @@ -564,7 +563,7 @@ def set_guild_channel(self, channel: channels.GuildChannel, /) -> None: guild_record = self._get_or_create_guild_record(channel.guild_id) if guild_record.channels is None: - guild_record.channels = hikari.utilities.collections.SnowflakeSet() + guild_record.channels = collections.SnowflakeSet() guild_record.channels.add(channel.id) @@ -1348,7 +1347,7 @@ def set_role(self, role: guilds.Role, /) -> None: guild_record = self._get_or_create_guild_record(role.guild_id) if guild_record.roles is None: # TODO: test when this is not None - guild_record.roles = hikari.utilities.collections.SnowflakeSet() + guild_record.roles = collections.SnowflakeSet() guild_record.roles.add(role.id) diff --git a/tests/hikari/impl/test_stateful_cache.py b/tests/hikari/impl/test_stateful_cache.py index ea2ef32f90..4f86aa294a 100644 --- a/tests/hikari/impl/test_stateful_cache.py +++ b/tests/hikari/impl/test_stateful_cache.py @@ -23,7 +23,6 @@ import mock import pytest -import hikari.utilities.collections from hikari import channels from hikari import emojis from hikari import guilds @@ -406,7 +405,7 @@ def test_clear_emojis_for_guild(self, cache_impl): mock_emoji_data_2 = mock.Mock(cache.KnownCustomEmojiData, user_id=snowflakes.Snowflake(123), ref_count=0) mock_emoji_data_3 = mock.Mock(cache.KnownCustomEmojiData, user_id=None, ref_count=0) mock_other_emoji_data = mock.Mock(cache.KnownCustomEmojiData) - emoji_ids = hikari.utilities.collections.SnowflakeSet() + emoji_ids = collections.SnowflakeSet() emoji_ids.add_all( [snowflakes.Snowflake(43123123), snowflakes.Snowflake(87643523), snowflakes.Snowflake(6873451)] ) @@ -515,7 +514,7 @@ def test_delete_emoji(self, cache_impl): ) mock_other_emoji_data = mock.Mock(cache.KnownCustomEmojiData) mock_emoji = mock.Mock(emojis.KnownCustomEmoji) - emoji_ids = hikari.utilities.collections.SnowflakeSet() + emoji_ids = collections.SnowflakeSet() emoji_ids.add_all([snowflakes.Snowflake(12354123), snowflakes.Snowflake(432123)]) cache_impl._emoji_entries = collections.FreezableDict( { @@ -543,7 +542,7 @@ def test_delete_emoji_without_user(self, cache_impl): ) mock_other_emoji_data = mock.Mock(cache.KnownCustomEmojiData) mock_emoji = mock.Mock(emojis.KnownCustomEmoji) - emoji_ids = hikari.utilities.collections.SnowflakeSet() + emoji_ids = collections.SnowflakeSet() emoji_ids.add_all([snowflakes.Snowflake(12354123), snowflakes.Snowflake(432123)]) cache_impl._emoji_entries = collections.FreezableDict( { @@ -617,7 +616,7 @@ def test_get_emojis_view_for_guild(self, cache_impl): mock_emoji_data_2 = mock.Mock(cache.KnownCustomEmojiData, user_id=None) mock_emoji_1 = mock.Mock(emojis.KnownCustomEmoji) mock_emoji_2 = mock.Mock(emojis.KnownCustomEmoji) - emoji_ids = hikari.utilities.collections.SnowflakeSet() + emoji_ids = collections.SnowflakeSet() emoji_ids.add_all([snowflakes.Snowflake(65123), snowflakes.Snowflake(43156234)]) mock_wrapped_user = mock.Mock(cache.GenericRefWrapper[users.User]) cache_impl._emoji_entries = collections.FreezableDict(