Skip to content

Commit 15d962a

Browse files
committed
fix: fix tests not working because of guilds list
1 parent e88d2a8 commit 15d962a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

tests/test_type.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from topgg import types
44

55
d: dict = {
6-
"defAvatar": "6debd47ed13483642cf09e832ed0bc1b",
76
"invite": "",
87
"website": "https://top.gg",
98
"support": "KYZsaFb",
@@ -127,7 +126,7 @@ def test_bot_data_fields(bot_data: types.BotData) -> None:
127126
for attr in bot_data:
128127
if "id" in attr.lower():
129128
assert isinstance(bot_data[attr], int) or bot_data[attr] is None
130-
elif attr in ("owners", "guilds"):
129+
elif attr == "owners":
131130
for item in bot_data[attr]:
132131
assert isinstance(item, int)
133132
assert bot_data.get(attr) == bot_data[attr] == getattr(bot_data, attr)

topgg/types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ def guilds(self) -> t.List[int]:
291291

292292
@property
293293
def certified_bot(self) -> bool:
294-
"""DEPRECATED: Certified bot is no longer supported by Top.gg API v0. At the moment, this will always be false."""
294+
"""DEPRECATED: Certified bot is no longer supported by Top.gg API v0. At the moment, this will always be False."""
295295

296296
warnings.warn(
297-
"Certified bot is no longer supported by Top.gg API v0. At the moment, this will always be false.",
297+
"Certified bot is no longer supported by Top.gg API v0. At the moment, this will always be False.",
298298
DeprecationWarning,
299299
)
300300
return False
@@ -313,10 +313,10 @@ def __init__(self, **kwargs: t.Any):
313313

314314
@property
315315
def shards(self) -> t.List[int]:
316-
"""DEPRECATED: Shard-related data is no longer supported by Top.gg API v0. At the moment, this will always return an empty array."""
316+
"""DEPRECATED: Shard-related data is no longer supported by Top.gg API v0. At the moment, this will always return an empty list."""
317317

318318
warnings.warn(
319-
"Shard-related data is no longer supported by Top.gg API v0. At the moment, this will always return an empty array.",
319+
"Shard-related data is no longer supported by Top.gg API v0. At the moment, this will always return an empty list.",
320320
DeprecationWarning,
321321
)
322322
return []

0 commit comments

Comments
 (0)