Skip to content

Commit b4b39b7

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

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/test_type.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_bot_data_fields(bot_data: types.BotData) -> None:
127127
for attr in bot_data:
128128
if "id" in attr.lower():
129129
assert isinstance(bot_data[attr], int) or bot_data[attr] is None
130-
elif attr in ("owners", "guilds"):
130+
elif attr == "owners":
131131
for item in bot_data[attr]:
132132
assert isinstance(item, int)
133133
assert bot_data.get(attr) == bot_data[attr] == getattr(bot_data, attr)

topgg/types.py

+4-4
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)