diff --git a/melisa/models/guild/guild.py b/melisa/models/guild/guild.py index 0e4495b..4ebc121 100644 --- a/melisa/models/guild/guild.py +++ b/melisa/models/guild/guild.py @@ -599,4 +599,4 @@ class UnavailableGuild(APIModelBase): self.id = Snowflake(int(data["id"])) self.unavailable = data["unavailable"] - return self \ No newline at end of file + return self diff --git a/tests/parsing/test_guilds_parsing.py b/tests/parsing/test_guilds_parsing.py index 43c63eb..9e47481 100644 --- a/tests/parsing/test_guilds_parsing.py +++ b/tests/parsing/test_guilds_parsing.py @@ -16,7 +16,7 @@ guild_data = { "MORE_EMOJI", "INVITE_SPLASH", "BANNER", - "COMMUNITY" + "COMMUNITY", ], "emojis": [], "banner": "9b6439a7de04f1d26af92f84ac9e1e4a", @@ -41,7 +41,7 @@ guild_data = { "system_channel_flags": 0, "preferred_locale": "en-US", "rules_channel_id": "441688182833020939", - "public_updates_channel_id": "281283303326089216" + "public_updates_channel_id": "281283303326089216", } parsed_model = Guild.from_dict(guild_data) @@ -60,5 +60,5 @@ class TestGuildParsing: "MORE_EMOJI", "INVITE_SPLASH", "BANNER", - "COMMUNITY" + "COMMUNITY", ] diff --git a/tests/test_caching.py b/tests/test_caching.py index 63c6fd0..13161a9 100644 --- a/tests/test_caching.py +++ b/tests/test_caching.py @@ -12,22 +12,10 @@ class TestCache: return CacheManager(**cache_params) def test_count(self, cache): - cache._raw_guilds = { - Snowflake(123): 123, - Snowflake(1234): 1111 - } - cache._raw_users = { - Snowflake(123): 123, - Snowflake(1234): 1111 - } - cache._raw_dm_channels = { - Snowflake(123): 123, - Snowflake(1234): 1111 - } - cache._channel_symlinks = { - Snowflake(123): 123, - Snowflake(1234): 1111 - } + cache._raw_guilds = {Snowflake(123): 123, Snowflake(1234): 1111} + cache._raw_users = {Snowflake(123): 123, Snowflake(1234): 1111} + cache._raw_dm_channels = {Snowflake(123): 123, Snowflake(1234): 1111} + cache._channel_symlinks = {Snowflake(123): 123, Snowflake(1234): 1111} assert cache.guilds_count() == 2 assert cache.users_count() == 2 @@ -35,9 +23,7 @@ class TestCache: assert cache.total_channels_count() == 4 def test_set_and_get_guild(self, cache): - cache.set_guild( - Guild.from_dict({"id": "123", "name": "test"}) - ) + cache.set_guild(Guild.from_dict({"id": "123", "name": "test"})) assert cache.get_guild(123).name == "test" @@ -47,8 +33,6 @@ class TestCache: cache.set_guild( Guild.from_dict({"id": "123", "name": "test", "channels": [channel]}) ) - cache.set_guild_channel( - TextChannel.from_dict(channel) - ) + cache.set_guild_channel(TextChannel.from_dict(channel)) assert cache.get_guild_channel(456).name == "test" diff --git a/tests/test_embeds.py b/tests/test_embeds.py index b6406d8..b5b8d7d 100644 --- a/tests/test_embeds.py +++ b/tests/test_embeds.py @@ -3,16 +3,12 @@ import datetime from melisa import Embed, Timestamp, Color dict_embed = { - 'title': 'my title', - 'description': 'simple description', - 'color': 252307, - 'timestamp': datetime.datetime.utcfromtimestamp(1649748784).isoformat(), - 'footer': { - 'text': 'cool footer text' - }, - 'author': { - 'name': 'best author' - }, + "title": "my title", + "description": "simple description", + "color": 252307, + "timestamp": datetime.datetime.utcfromtimestamp(1649748784).isoformat(), + "footer": {"text": "cool footer text"}, + "author": {"name": "best author"}, } EMBED = Embed(title="my title", description="simple description")