From 15d962a411a304014086f06cd18f5274ed049e39 Mon Sep 17 00:00:00 2001 From: null8626 Date: Tue, 18 Feb 2025 14:29:00 +0700 Subject: [PATCH] fix: fix tests not working because of guilds list --- tests/test_type.py | 3 +-- topgg/types.py | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test_type.py b/tests/test_type.py index c66c81b..f53abf6 100644 --- a/tests/test_type.py +++ b/tests/test_type.py @@ -3,7 +3,6 @@ from topgg import types d: dict = { - "defAvatar": "6debd47ed13483642cf09e832ed0bc1b", "invite": "", "website": "https://top.gg", "support": "KYZsaFb", @@ -127,7 +126,7 @@ def test_bot_data_fields(bot_data: types.BotData) -> None: for attr in bot_data: if "id" in attr.lower(): assert isinstance(bot_data[attr], int) or bot_data[attr] is None - elif attr in ("owners", "guilds"): + elif attr == "owners": for item in bot_data[attr]: assert isinstance(item, int) assert bot_data.get(attr) == bot_data[attr] == getattr(bot_data, attr) diff --git a/topgg/types.py b/topgg/types.py index 7ce146f..bea8250 100644 --- a/topgg/types.py +++ b/topgg/types.py @@ -291,10 +291,10 @@ def guilds(self) -> t.List[int]: @property def certified_bot(self) -> bool: - """DEPRECATED: Certified bot is no longer supported by Top.gg API v0. At the moment, this will always be false.""" + """DEPRECATED: Certified bot is no longer supported by Top.gg API v0. At the moment, this will always be False.""" warnings.warn( - "Certified bot is no longer supported by Top.gg API v0. At the moment, this will always be false.", + "Certified bot is no longer supported by Top.gg API v0. At the moment, this will always be False.", DeprecationWarning, ) return False @@ -313,10 +313,10 @@ def __init__(self, **kwargs: t.Any): @property def shards(self) -> t.List[int]: - """DEPRECATED: Shard-related data is no longer supported by Top.gg API v0. At the moment, this will always return an empty array.""" + """DEPRECATED: Shard-related data is no longer supported by Top.gg API v0. At the moment, this will always return an empty list.""" warnings.warn( - "Shard-related data is no longer supported by Top.gg API v0. At the moment, this will always return an empty array.", + "Shard-related data is no longer supported by Top.gg API v0. At the moment, this will always return an empty list.", DeprecationWarning, ) return []