Skip to content

Commit 897d68a

Browse files
update typehints
1 parent e6df8cd commit 897d68a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

botstrap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
raise ValueError(message)
4949

5050

51-
class SilencedDict(dict):
51+
class SilencedDict(dict[str, Any]):
5252
"""A dictionary that silences KeyError exceptions upon subscription to non existent items."""
5353

5454
def __init__(self, name: str):
@@ -156,7 +156,7 @@ def create_forum_channel(
156156
self,
157157
channel_name_: str,
158158
category_id_: int | str | None = None
159-
) -> int:
159+
) -> str:
160160
"""Creates a new forum channel."""
161161
payload = {"name": channel_name_, "type": GUILD_FORUM_TYPE}
162162
if category_id_:
@@ -176,7 +176,7 @@ def delete_channel(self, channel_id_: int | str) -> None:
176176
log.info(f"Channel python-help: {channel_id_} is not a forum channel and will be replaced with one.")
177177
self.delete(f"/channels/{channel_id_}")
178178

179-
def get_all_roles(self) -> dict:
179+
def get_all_roles(self) -> dict[str, int]:
180180
"""Fetches all the roles in a guild."""
181181
result = SilencedDict(name="Roles dictionary")
182182

0 commit comments

Comments
 (0)